Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Real-time workflow for Entity with BPF does not pick up the currently selected process stage

Posted on by Microsoft Employee

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). 

2017_2D00_07_2D00_21_5F00_1424.png

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

  • Suggested answer
    ashlega Profile Picture
    ashlega 34,475 on at
    RE: Real-time workflow for Entity with BPF does not pick up the currently selected process stage

    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.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Real-time workflow for Entity with BPF does not pick up the currently selected process 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.

  • David Jennaway Profile Picture
    David Jennaway 14,063 on at
    RE: Real-time workflow for Entity with BPF does not pick up the currently selected process stage

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans