, , , , , , , ,

Hello Everyone,

I was working on a requirement wherein on the change of the Stage in Business Process flow,  I was suppose to do some Action like setting the visibility for few fields and making other fields Read Only. The actions can be completed easily with the Business Rules but the main criteria was to capture the current Stage name so that the Trigger for Synchronous Workflow or Business Rules could be set.

Well, we know that when the Business Process is selected under any Entity then two new fields are introduced:-

Procesid :- Type of Unique Identifier which Shows the ID of Process.

Stageid :- Type of Unique Identifier which Shows the ID of Stage.

I recently ran through a post from my one of fav MVP Jukka Niiranen, who has written some excellent post on Business Process and Synchronous Workflow. I’ll also explain same in my scenario as how using the combination of both new features; some functionality can be achieved without writing any plugin-code.

In my scenario to capture the Current Business Process Name and Stage Name I created two Text fields on Lead Entity. If you explore the Database a bit then you’ll find that the Stage Name is maintained in the ProcessStage Table, which we can use to capture the exact Stage Names from.

 I then created a Synchronous workflow to update Lead with current Process Name and Stage Name whenever Any Stage changes within, mentioned as “Stageid“.

Now the Lead can be updated with those two new Text fields that were created to capture the current Process Names and Stage Name from the related Entity Process Stage.

Once the process is Saved and Activated, the Stage Name Fields were getting populating both on Creation of new Lead and Stage change. The same can be achieved with any Entity running Business Process Flow.

This field can be set to be hidden and used as trigger for further Asynchronous Workflows and Business Rules. In my next posts I’ll discuss how to utilize this process to take further Actions on a record.

Hope this will be Helpful.

Thanks !!!