web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Set stage Business Process Flow with Plugins

(0) ShareShare
ReportReport
Posted on by

Hi,

We need create incident registers  which need to be in a specific BPF state into Dynamics 365 (online). The BPF contains multiple conditions and paths, so it looks something like this.

[Stage1] -- IF X -- [Stage2] -> [Stage3] -> [Final Stage]
              -- IF Y -- [Stage4] -> [Stage5] /
              -- IF Z -- [Stage6] -> [Stage7] /

So they all start in [Stage1] and end up in [Final Stage], but the path is different.

Could be [Stage1]->[Stage2]->[Stage3]->[Final Stage]
or [Stage1]->[Stage4]->[Stage5]->[Final Stage]
etc.

When the incident is created directly in CRM in the initial Stage1, everything works correctly.

But when we import it and set the processingStageId to [Stage5] (for example) it ends up going through all the previous stages, so it looks something like this:
 [Stage1]->[Stage2]->[Stage3]->[Stage4]->[Stage5]

We would like to change it to [Stage1]->[Stage4]->[Stage5]

I have tried updating (via SDK update of entity) the traversedpath attribute of the opportunity, but it doesn't update. It doesn't throw any errors when trying, but it doesn't do anything.

Update code is something like this:

Entity entity = new Entity("incident ");
entity["incident id"] = incident Id;
entity["traversedpath"] = "faa90e07-a987-4537-a7ba-53a6cdafa1fd,2431e8c8-aeb1-4d82-a6a5-0dbfa396df1d";

orgService.Update(entity);

I can see that the traversedpath is actually being updated, but it didn't change anything on the incident. Except that the go forward/go back operations started failing now -> since the system is in an inconsistent state.

 Any Idea how I can solve this in D365 online? 

Would really appreciate any help!

*This post is locked for comments

I have the same question (0)
  • David Jennaway Profile Picture
    14,065 on at

    The traversedpath attribute should be considered read-only, as it gets derived from the BusinessProcessFlowInstance entity. Unfortunately I don't think it's supported to update the BusinessProcessFlowInstance entity, though I've not tried recently. See https://crmtipoftheday.com/2014/12/19/the-paths-we-choose/ for a bit more info

  • Verified answer
    MSCRM Guru Profile Picture
    600 on at

    Hi,

    This should be correct, but you need to make sure the current stage is the last guid in the traversed path.  Also, make this change with the setting of the StageId, as part of the same update message.

    Based on your example, If you want to be in stage 5, the traversedpath should have 3 guids, Stage 1, Stage 4 and Stage 5.

    Good luck!

  • Community Member Profile Picture
    on at

    Thanks in advance.

    At the end the error was that the BPF required fields were not informed. Thank you both for putting me on the way to solve my problem.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans