web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Make expense reports editable / Making fields editable doesn't work

(0) ShareShare
ReportReport
Posted on by

Hello AXers,

As in the title, I need to make the expense reports editable for the final approber in the workflow.

The first thing I did is add an Edit command button to the form TrvExpTable. 

So first 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!

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hello Slim,

    we are talking about the Enterprise Portal?

    Do you have published the corresponding website and restart the iis?

    "Publish-AXWebComponent -Proxy –WebSiteUrl {URI}"

    IISRESET

  • Community Member Profile Picture
    on at

    Hey Sascha,

    No I'm talking about the TrvExpTable form in the rich client, located in Travel and expense > Common > Expense reports > All expense reports

  • Community Member Profile Picture
    on at

    Ok.

    Why do you place your code

    trvExpTrans_ds.allowEdit(true);

    trvExpTrans_ds.object(fieldNum(TrvExpTrans, AmountCurr)).allowEdit(true);

    in the .active() - Method of the datasource?

  • Community Member Profile Picture
    on at

    Yes, the active method of the TrvExpTrans datasource " TrvExpTrans : active "

    Here's the code :

    public int active()
    {
        int     ret;
        boolean allowEdit = true;
    
        ret = super();
    
        element.enableLineFields();
        element.enableLineButtons();
        //element.
    
        //Allowing user to edit expense lines
        trvExpTrans_ds.allowEdit(allowEdit);
        trvExpTrans_ds.object(fieldNum(TrvExpTrans, AmountCurr)).allowEdit(allowEdit);
    
        return ret;
    }


    I also tried adding these lines in the init method of form, but nothing.

  • Community Member Profile Picture
    on at

    Hi Slim,

    In standard Expense report some fields like Receipt attached, tax fields,... are editable  for user who are all going to approve the expense report.

    You could refer that part and do the corresponding changes.

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hi Slim ROUISSI,

    Just a general question/remark about your request:

    Doesn't the ability of a final approver to edit/modify expense reports contradict the separation of process execution and control?

    If the final approver is able to edit the expense reports, why doesn't he record them himself? ;-)

    Probably review your process flow and controls before you implement this adjustment.

    Best regards,

    Ludwig

  • Community Member Profile Picture
    on at

    Hi ,

    In general after submitting the expense, the reporting manager or some one from AP team will validate whether the original receipt are attached or not , validate the correct tax code is selected, exchange rate if different currency expense submitted.

    As Ludwig mentioned review the standard process and implement the changes.

  • Community Member Profile Picture
    on at

    Hi Paranjothi,

    No there is not. In the standard workflow ( TrvDocumentTemplate ) the only type of approval found is "Approve expense report" there's no "Approve expense report, editable". If you take the PurchTableTemplate workflow there are both options "Approve purchase order" and "Approve purchase order, editable".

    Plus, if you open the standard TrvExpTable, you'll see that  you can't edit anything and there's no Edit command button at all.

  • Community Member Profile Picture
    on at

    Hi Ludwig,

    In fact it's our client choice in order to make the process faster, it is their process flow, validated during the analysis phase. The goal is to make the treatment fast because it's only one person that approves the expense reports for a whole group of companies.

    Why doesn't he record them himself? Well because he has others things to do first, and because his job is to review expense reports and edit them if needed ;)

    Thank you for your help.

    Warm Regards,

    Slim.

  • Community Member Profile Picture
    on at

    Hi Slim,

    In standard Receipt attached field is editable to users who are going to approve.

    Reason behind this field editable is to validate whether the receipt got attached is valid or not, Whether receipt are attached are not.

    It does not require additional workflow approval element like Approve expense report, editable on PO workflow.

    If it is not editable install hot fix to make some fields editable.

    I mentioned to use the same logic to make your fields editable.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans