Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Two Workflow in same form

Posted on by 50

Hello,

I have two grids (Header - Line : One to many) and i want to configure workflow for both of these grids. I did some research on this topic and made following:

I created a WF category > Created two WF types > Created two WF approvals

Then created two workflows on the system. I overrided method CanSubmitToWorkflow for each table and configured workflow as to submit each workflow.

On design properties of form, i selected WorkflowEnabled to yes, Datasource to Header Datasource, and Type to header WF type;

On the grid mouse down, i do the following:

On grid Lines Mouse down:

element.design().workflowDatasource(ActLines_ds.id());
element.design().workflowType(workFlowTypeStr(ActLines));
element.updateWorkflowControls();

On grid table Mouse Down:

element.design().workflowDatasource(ActTable_ds.id());
element.design().workflowType(workFlowTypeStr(ActTable));
element.updateWorkflowControls();

But when i submit the line item to workflow, i debug and see that the header is subbmitted. I can't solve this problem, urgent help needed.

 

*This post is locked for comments

  • Verified answer
    Satish Panwar Profile Picture
    Satish Panwar 14,645 on at
    RE: Two Workflow in same form

    In addition to what Dr. Ludwig mentioned if you try to configure PO header workflow, you will notice that there is option to include line level workflow underneath it. So from PO perspective you submit header but then it triggers line level workflows.

  • Verified answer
    Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: Two Workflow in same form

    Hello badiyev,

    The standard PO form has this header and line workflow functionalities available.

    Probably have a look at how this is designed and compare it with your solution.

    Best regards,

    Ludwig

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans