Customization and Configuration · Dynamics 365 Quick Tips · Functional Info

{Dynamics 365} Set business process flow while creating an entity record

Recently while working on one of the client requirement we wanted to set specific Business Process Flow while creating a record from Integration.

When we create multiple Business Process Flow for a particular entity system follows some predefined rules to associate BPF to a record.

However when we create record from integration we can set specific BPF to be associated to the record.

To do that we need to set ProcessId field of an entity as mentioned below

  • Set to Guid.Empty to skip setting a business process flow for new entity records. You might want to do that if you are bulk creating entity records, but don’t want business process flow to be applied to them.
  • Set it to a specific business process flow entity (as an entity reference). In this case, the system will apply the specified business process flow instead of the default logic.

If you do not set a value for the ProcessId attribute while creating a new entity record, the system will apply the default logic.

newEntity[“processid”]=Guid.Parse(“BPF Record ID”);

Reference

https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/model-business-process-flows#apply-business-process-flow-while-creating-an-entity-record

Hope this helps!

Advertisement

3 thoughts on “{Dynamics 365} Set business process flow while creating an entity record

  1. Hi,
    I see the documentation is about the on premise version of customer engagement.

    Does this also work in the context of Power Platform online?

    I am struggling to get this working.

    Like

    1. Hello Maik,

      Thanks for reading my blog!

      This should work in Dynamics 365 Online. What is the behaviour do you see in your case?

      Would you be able to share your source code to check the issue?

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s