SBX - Search With Button

SBX - Forum Post Title

Expense Report workflow - Line item approval and Line item auto posting

Microsoft Dynamics AX Forum

MHUHN asked a question on 13 Jun 2018 5:01 PM

Question Status

Suggested Answer

Hello,

[Dyanmics AX 2012 R2 CU9]
I understand the Expense line item approval workflow type, however I see that there is a TrvLineItemAutoPostingWorkflow type workflow and am curious how this workflow type is used? 

From the 'name', it sounds like it might be for auto posting approved expense lines.
Is this true? Is it even possible? ... the posting through the UI is for the whole document, so was surprised to see the workflow type with this name.
I can't find anything about this workflow and I can't seem to use this type as a subworkflow in the Expense Line Item (TrvLineItemTemplate), as I would have expected.

Thank you,
-Mike

Reply
Crispin John Augustine responded on 14 Jun 2018 1:53 AM
My Badges

You will not be able to add this as a Sub workflow, but you can add the automated Task 'TrvLineItemAutoPostingTask' to your workflow.

The function of this Task/workflow will become clearer if you look into the Code at the class method TrvLineItemAutoPostingEventHandler.execute()

Reply
MHUHN responded on 15 Jun 2018 1:52 PM

The event handler code for TrvLineItemAutoPostingTask does appear to post the expense lines.

What struck me as odd was that no out of the box workflow types have TrvLineItemAutoPostingTask as a support element (except for TrvLineItemAutoPostingWorkflow).  TrvLineItemAutoPostingWorkflow cannot be used by itself, right?

If anyone has used the TrvLineItemAutoPostingTask in a workflow, can you please let me know your workflow scenario?  I am looking at ways to utilize expense line level approval and auto posting of the line, if it is possible to do without all lines on the expense report document being approved.

Reply

SBX - Two Col Forum

SBX - Migrated JS