When you create a new entity record in Dynamics 365, the system automatically applies a business process flow. This default behavior ensures that entity records are aligned with established workflows, enhancing both consistency and compliance. However, understanding and managing which business process flow gets applied can significantly enhance your customization and operational efficiency.
Default Application of Business Process Flows
The system determines which business process flow to apply using a multi-step logic:
- Applicability Check: The system first identifies all business process flows that are applicable to the new entity record, based on the
Workflow.PrimaryEntityattribute of each business process flow definition. - User Access: It then checks which business process flows the current user can access. This step ensures that only authorized flows are considered.
- Global Order Sorting: All applicable business process flows are sorted based on the
Workflow.ProcessOrderattribute. The flow with the lowest order value is selected by default. - App Context Filtering: If the entity record is created within a specific business app, further filtering is applied. Only the flows that are included and permitted within the business app’s module are considered.
If no business process flows are included in the business app, the system defaults to the logic described up to step 3. If one or more flows are present, only those within the app are applicable.
Customizing Business Process Flow Application
You have the option to override the default logic when creating a new entity record. This can be particularly useful in scenarios such as bulk record creation where you might want to bypass process flows, or if you need to apply a specific flow that deviates from the default logic.
- Skipping a Flow: Set the
ProcessIdattribute of the entity toGuid.Emptyto prevent any business process flow from being applied. - Applying a Specific Flow: Alternatively, set the
ProcessIdto the GUID of a specific business process flow to apply that flow instead of the default.
It’s important to note that these overrides can only be implemented programmatically; the UI does not support this level of customization.
