Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

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

(0) ShareShare
ReportReport
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)
  • 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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans