Hello AXers,
As in the title, I need to make the expense reports form TrvExpTable editable.
The first thing I did is add an Edit command button. I didn’t work so I took a look to the active method of the TrvExpTrans datasource ( since our approbator needs to edit lines ) an added them these lines to test the edition mode :
trvExpTrans_ds.allowEdit(true);
trvExpTrans_ds.object(fieldNum(TrvExpTrans, AmountCurr)).allowEdit(true);
But unfortunatly it didn’t work I’m still not able to modify neither the lines nor the amount.
If you have any clue on what could be blocking the edition mode it would be great.
Thank you!
Hi,
Seems the lines of expense report would be editable as long as the report has draft status. Once submitted(in-review) its by design that reports would be read only.
In case you are using a custom field, i believe, you might need add the field on the edit and read only section in the markup of the webcontrol/TrevExpTrans(AX 2012).
Please suggest if the field you are using is std. or custom and what would be the status of expense report when you expect the desired field to be editable.
/Nik
Hi Nik,
In fact I did this on the rich client and not EP. I’m not using the custom field, but our client requirement is that someone (the final approber) to be able to edit the AmountCurr and the Category and even be able to add lines.
But first I need to make him able to edit those fields, wether it is in the rich client or Enterprise Portal, and when the expense report is in review or approved status for the CFO to be able to edit it.
Look at the allow edit property for the group. It was set to NO.
Thanks kranthi,
It works, they’re now editable :
But when I try to edit it I get this error :
Do you have an idea where I can fix this or at least put a breakpoint to try to fix it ?
Thank you!
start looking form the validateWrite, it seems there are some restrictions to edit the fields on that table.