Make transaction date modifiable when chosing per diem as the category for a new expense line

182 views Asked by At

When adding a new expense line in Dynamics AX Enterprise Portal 2012 , you can choose some expense category which make the transaction date modifiable for the user. If the expense category is "per diem", the transaction date is not modifiable, but when I choose for example AirFare, the transaction date is modifiable.

What I want to know is what modification do I need to do to make the transaction date modifiable for the user when chosing "per diem" as the expense category.

1

There are 1 answers

0
Phu Minh Pham On

I've found the solution:

In TrvExpTransAddEdit.ascx.cs there is a switch case which sets the boundfield to readonly:

case "TransDate":
    boundField.FastTabSummary = FastTabSummary.Yes;
    if (expenseType == ApplicationProxy.TrvExpType.Allowance)
    {
        TransDate i portalen bliver editér bar
        boundField.Mandatory = false;
        boundField.ReadOnly = true;
    }

I've change the property readOnly = false and now the transaction date field is modifiable.