Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Two Workflow in same form

(0) ShareShare
ReportReport
Posted on by 52

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
    14,655 Moderator 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
    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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,325 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,025 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans