How to Enable Multiple Workflows for the Same Record

Hi everyone,

I have a requirement to use two different workflows on the same ProjTable record in Dynamics 365 Finance & Operations.

I created:

  • One workflow for WPS

  • One workflow for Item Requirement

Both workflows are connected to ProjTable, and each workflow has its own status field and its own WorkflowIDropDialog.

The workflow actions are working correctly individually.

However, I am facing an issue when both workflows are used on the same project record.

Example

  1. I submit the Item Requirement workflow.

  2. The workflow can be in any status (Submitted, In Review, Pending Approval, etc.).

  3. Then I submit the WPS workflow.

After submitting the WPS workflow:

  • The Item Requirement workflow gets mixed with the WPS workflow.

  • Sometimes it looks like the Item Requirement workflow is submitted again.

  • Or the workflow history screen shows the WPS workflow instead of the correct one.

Business Requirement

I need to have two separate workflows on the same project:

  • One workflow affecting the WPS process

  • One workflow affecting the Item Requirement process

Also, I need to enable/disable the entire WPS page or Item Requirement page depending on the status of each workflow independently.

Has anyone implemented something similar before?
Is it supported to run multiple workflows on the same table/record?
What is the best practice to separate the workflows and their histories correctly?

Thanks.

Hi @Yazeed_SH

Interesting scenario. Running multiple workflows on the same record is definitely something we’ve seen before.

A couple of questions that may help narrow it down:

  • Are both workflows using separate workflow types and document classes?

  • Do you have separate status fields for WPS and Item Requirements on the ProjTable?

  • Is the issue only with the workflow history display, or are the workflow statuses and actions also getting mixed?

  • Can both workflows be active on the same project at the same time, or is one expected to complete before the other starts?

The screenshots make it look like there may be some overlap in how the workflow instance or history is being retrieved, but a little more detail on the setup would help understand what’s happening.

Hi @Hardik_Gupta

I appreciate your response and the points you raised.

I was able to resolve the issue and successfully implement two workflows on the same form and the same record by using separate custom fields to manage each workflow independently.

The solution was implemented using the following approach:

  1. Created both workflows, including their workflow types, approval steps, and workflow configurations.

  2. Added two custom fields to the table/header to independently manage and track the status of each workflow.

  3. Duplicated the form that implements WorkflowIDropDialog so that each workflow has its own dialog handling logic.

  4. Duplicated the WorkflowStatus form and modified the logic to retrieve the current record based on the active workflow type through the workflow version table.

  5. Duplicated WorkflowDropDialog and updated the logic to support multiple workflows on the same record while correctly identifying the active workflow context.

  6. Created an extension/helper around WorkflowStatusForm because some required methods are marked as internal; equivalent public methods were exposed for use in the custom implementation.

  7. Duplicated certain internal framework classes where necessary to reuse the required functionality within the custom solution.

  8. Added workflow-specific page behavior so that each workflow controls its own UI logic independently based on its corresponding custom field.

After these changes, both workflows can run independently on the same project record without interfering with each other.

That sounds great, keep growing.

Thank you! @Hardik_Gupta