Whats happening?
When attempting to save a new record in a custom service request entity within Dynamics 365, users encounter the following error message:
ErrorCode: 0x80040265 Message: Workflow must be in Published state.
Reason:
This occurs because one or more workflows associated with the record creation or update process are in a draft (unpublished) state. Dynamics 365 requires all related workflows to be in a published state for them to execute properly.
Common causes include:
- A workflow is in a draft state after recent edits or creation.
- An ARC rule references a workflow that is still in draft mode.
- Custom workflows or plugins triggered during record creation are not published.
Resolution:
To resolve this, follow these steps:
- Navigate to the Dynamics 365 environment.
- Go to Advanced Settings > Processes in Dynamics 365.
- Set the Process Type filter to Workflow.
- Check for workflows with the status “Draft” or “Unpublished”.
- Select each draft workflow and click Activate to publish it.
- Perform a hard refresh in the browser (e.g., press Ctrl + F5 or Cmd + Shift + R). Alternatively, clear the browser cache to ensure the latest published workflows are applied.
- Verify by attempting to create a new record in the service request entity again.
If the workflow was intentionally disabled to stop certain functionalities, it is recommended to keep the workflow enabled temporarily and coordinate with your development team to remove or modify the undesired functionality separately.