I have an entity with BPF and a real-time workflow configured for it in a D365 Version 1612 (8.2.1.207) (DB 8.2.1.207) environment. The workflow is triggered after the entity record is created, and also when the Stage Id (process stage) is updated.
What I am trying to do is to update a field in the entity with the name of the currently selected stage. What happens though is that the real-time workflow picks up the previously selected stage.
Since there are no System Jobs for real-time workflow, I made quick test with a real-time workflow that sends some values of the entity and processed stage to my email. As you can see, the currently active or selected stage is set to Pending Booking, but the stage that was evaluated by the workflow is the stage before it (Discuss Availability).
Just my thoughts, I may be mistaken, but what I can only derive from this is that the stage ID was updated (triggering the workflow) but not yet persisted, which may be the reason why the real-time workflow is still picking up the previous stage ID?
Is this an issue with D365, or is there some configuration that needs to be done with regards to making real-time workflows work with entities that have BPF?
Will appreciate any feedback. Thanks!
*This post is locked for comments
Hi,
in this version, you may want to use BFP entities in the workflows instead of those two original fields. It was a little different scenario here:
www.itaintboring.com/.../lets-rule-the-business-process-with-a-workflow
But, still, if you register that workflow on the update of the corresponding BPF entity, I'm pretty sure you'll be able to get the stage.
Hi David, the option for the trigger is already set to 'After'.
- After the record is created.
- After the record field "Stage ID" is updated.
A thing to note though is that this issue happens only for real-time workflow. There is no problem when I use a background workflow.
The first thing to check is whether you have the option 'Before' or 'After' set for the record status / record fields change triggers ? If you have 'Before', I would expect the behaviour that you see, and try changing it to 'After'.
However, if you see this behaviour with 'After', then I think the only option is to see if you can change the processing order. This is controlled via the Rank of the respective SdkMessageProcessingStep (I believe CRM creates a SdkMessageProcessingStep record for the workflow, and the BPF), but can only be accessed programmatically
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156