The behavior indicates another synchronous process (plugin/workflow) resetting the status in the same transaction. Since both changes occur at exactly 6:36, it is almost certainly happening in the plugin pipeline.
1. Identify the conflicting process: Enable Plugin Trace Log in Production:
Settings → Administration → System Settings → Customization
Enable logging to plugin trace log = All
Reproduce the issue and check: Advanced Find → Plugin Trace Logs
This will show which plugin/workflow executed after the parent plugin and changed the status back to Draft.
2. Check plugin registration order: Open Plugin Registration Tool and verify steps on the child entity: Look for messages:
Update
SetState
SetStateDynamicEntity
Assign
Check Execution Order. A later plugin is likely overriding the status.
3. Fix: Update the child-status plugin logic to prevent overwrites:
if (child.Status != WaitingForFinanceApproval)
{
child.Status = WaitingForFinanceApproval;
}
Or ensure it runs last in execution order.
4. Also verify
- Real-time workflows
- Business rules
- Power Automate flows
triggered on Update or Status Change of the child entity.
Expected: After adjusting plugin logic or execution order, the child records will retain "Waiting for Finance Approval" and not revert to Draft.
I hope this works for you!