Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

can we create Two workflows in single form ?

Posted on by 1,010

Hello All,

I have created a workflow for Bank Account Creation. Now again i want to create workflow for Bank Account Modification. but i cant use two WorkFlows at a time. So, how can I use workflow for Bank Account Modification ?  

  • Jonathan  Halland Profile Picture
    Jonathan Halland 11,302 on at
    RE: can we create Two workflows in single form ?

    Hi DKS, for submission the workflow system needs a description which it finds from the default workflow for that document type.

    In your active method of your datasource you could set the default workflowtype for the form in code....E.g.\

    if (some condition)

    element.design().workflowType(workFlowTypeStr(MyApproveWorkflow));

    else

    element.design().workflowType(workFlowTypeStr(MyDeleteWorkflow));

  • D.K.S. Profile Picture
    D.K.S. 1,010 on at
    RE: can we create Two workflows in single form ?

    Hi Jonathan,

    I am using same workflow to first for create BankAccount and Second for delete BankAccount. after first workflow submission, I am submitting second workflow but i am getting same Subject in Notification after submission of Delete bank Account workflow. I want to change Subject of workflow Notification for these two different task. How can i achieve it ?

  • Verified answer
    Jonathan  Halland Profile Picture
    Jonathan Halland 11,302 on at
    RE: can we create Two workflows in single form ?

    Hi DKS.

    You can create multiple workflows and simply specify "activation conditions" on each of the workflows so that you know which one to kick off.

    Alternately. You can customize and use the same Submit button for both workflows. Then in the class behind the submit button  you can add some logic before your call to Workflow::activateFromWorkflowType to pass the relevant workflow type parameter.

Helpful resources

Quick Links

Can you answer this forum question?

You could make someone's day!

Community Newsletter - May 2024

Kudos to our community stars!

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,632 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 224,528 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Featured topics

Product updates

Dynamics 365 release plans