Skip to main content

Notifications

Dynamics 365 general forum
Suggested answer

How to retrieve active business process flow on entity in workflow C#?

Posted on by
I have a workflow which should finalize/complete business process flow which is associated with the lead entity, how can i retrieve the active business process flow which and gets its ID ? In the inputs i am sending entityName (lead) and entityid (some id of lead entity), any help appreciated
 
 
i tried doing this but no luck (i get Guid.Emtpy error)
Categories:
  • Suggested answer
    Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    How to retrieve active business process flow on entity in workflow C#?
    Hi Partner,
    In fact, Business process flow will use separate entities to store its instance records.
    When you create oneLead’ record, which also creates record in ‘BPF entity’.
    So you need use the RetrieveProcessInstances message (RetrieveActivePath Function or RetrieveProcessInstancesRequest) to retrieve all the business process flow instances for a table row across all business process definitions. 
    Maybe you can refer to the following blogs, Some of the code can be found in:

    I hope you can verify my answer if it helps you! If you have any questions, please feel free to contact me.
    Regards,
    Leah

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,524 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans