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)

Expense report and expense report auto posting workflow

(0) ShareShare
ReportReport
Posted on by 1,226

Hi,

Version: Dynamics AX 2012 R3

I am trying to setup an expense report workflow in AX. I want expense report line level approval and the auto posting of the report in the end.

I have setup first workflow for 'Expense report' with 'Expense report line' workflow inside it. I have setup another workflow of 'Expense report auto posting' with a sub-workflow of type 'Expense report'. My idea is when an expense report is submitted, it should be picked up by auto posting workflow and trigger sub-workflow of expense report approval. Once approval is done it will be posted via outer workflow.

In reality when an expense report is submitted to workflow, it is getting picked up directly by 'Expense report' workflow and not by 'Expense report auto posting' workflow. As a result, expense report is only getting approved not posted.

Can anybody tell me how to achieve both approval and posting done by workflows?

Regards,

Deepak

*This post is locked for comments

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

    Hi DG,

    have you checked that the "Expense report" workflow is Inactive? To check it go to Travel and Expense workflow -> Versions -> check "make inactive". If it is inactive the Expense Report submitted should not be picked up by that workflow.

    Hope it helps,

    Paolo

  • DG Profile Picture
    1,226 on at

    Hi Paolo,

    It is active. I'll make it inactive but will that make it trigger if as a sub-workflow of 'Expense report auto posting' workflow?

    Regards,

    Deepak

  • Community Member Profile Picture
    on at

    Hi DG,

    sorry, I misunderstood part of your question.

    Try to have a look at this blog article to which I referenced sometimes ago, that should be specific on what you are asking:

    sandeepchaudhury.wordpress.com/.../automated-tasks-in-workflows-in-microsoft-dynamics-ax-2012

    Hope it helps!

    Paolo

  • DG Profile Picture
    1,226 on at

    Hi Paolo,

    I do not want to customize AX at this point. And wondering if it is possible to get the expense report approval and auto posting without customization.

    I tried my setup the other way around - Set the expense report as main workflow and put auto approval as a sub-workflow inside it. It worked weirdly. It created two steps for auto-posting. The first one get into status 'Completed' but the second one goes into 'Error'. The net result is that the expense report gets approved but not posted.

    Below is the workflow setup.

    And here is the workflow history of one of the expense report

    I cannot understand why auto-posting workflow is called second time?

    Regards,

    Deepak

  • DG Profile Picture
    1,226 on at

    Looks like images did not go through in my last post.

    Workflow history - http://1drv.ms/14VTj9l

    Workflow setup - http://1drv.ms/1yjg1C3

  • Jonathan  Halland Profile Picture
    11,310 on at

    HI DG.

    Why do you have a separate workflow for auto-posting and not just an additional step within the main workflow (after line level)?

    Otherwise you will need to ensure that that your Outer workflow is set as the default workflow and not the auto-posting workflow.

  • DG Profile Picture
    1,226 on at

    Hi Jonathan,

    There is no automatic action for auto-posting in 'expense report' workflow. So it can't be added as an additional step directly.

    On submission, the workflow batch is picking up the expense report workflow not auto-posting workflow. The issue is in its workflow steps, the auto-posting workflow is kicking two times - not sure why?

    Regards,

    Deepak

  • Santosh Profile Picture
    766 on at

    Hi,

    Did you got solution on expense 'Expense report auto posting'?

    Thanks in advance.

  • Santosh Profile Picture
    766 on at

    WF_5F00_Modified.pngWF_5F00_Modified.pngWF_5F00_History.png

    Hi Paolo, I have followed the same but it is not working as explained in Sandeep blog.

    1. Expense Report Workflow modified in AOT as explained in blog

    2. Save and build Generate Incremental CIL

    3. Open workflow and dragged Auto Posting task

    4. Saved WF and tested as usual. ( Create New expense > Approved )

    5. WF moves as per approval flow and showed as Auto Posting task completed, but actually it is not and Document status is "Approved" only.

    When I tried to post manually after clicking button Post it went through so there is no issue on document like posting account, posting dates or any other.

    Do you identified where I am doing wrong and what is the issue so that posting doesn’t happened from workflow.

    I have attached all required screen for references.

  • Suggested answer
    Chris R Tilley Profile Picture
    339 on at

    Hi there,

    I stumbled across this post whilst trying to find a KB article to go with a Hotfix which I've been passed by one of our other consultants.

    You may be hitting this issue:

    KB Article Number (s) : 3143005   Expense report auto posting workflow fails in UK

     

    It only seems to be a problem with UK Companies for some reason.  Contact MS Support if you think this applies.  I couldn't find a KB article, so you'd need to verify with support if it's the right case as you.

     

    Cheers,

     

    Chris

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