25 Oct’17

Dynamics 365, EnterprisePut validation on Business Process Flow


CRM business process flow allows users to enter data in steps which makes it simple and don’t required to scroll down all the way to bottom of form. A single business process flow can be divided into small steps to achieve the same and enter the data easily.

But user may have requirement where a person should not move to the next stage. If it is based on the field than there is no problem, user can simply set the field required and get requirement fullfilled.

But what if user should not allow to move to the next stage until a record of related entity is not present. For example, an account should have a phone call or an appointment to move the next stage.

Or in our case an Incident should have few documents attached to it before moving to the next stage.

While moving from Reporting to Insurance stage it should have below listed document. Otherwise it should display an error.


To achieve this requirement, we can write a plugin on the business process flow. But we must understand the structure of the Business process flow.

  • While creating a new business process flow it creates a new entity with the same name.
    • Which holds the related entity name
    • Current stage
    • Record with which it is associated
  • When creating a record with the having business process flow.

    • Name of the business process flow: Incident Business Process
    • Active stage: Reporting
    • Record name: 20171025–ESTDEL55-1

Plugins- Write Code:

We need to write code and need to compare the current stage with previous stage and check if required document is present or not.
Using the above information user can write a plugin and stop the user to move the next stage until required document is provided.

Register Plugin:

Once you have completed the code you need to register the plugin on update of business process entity.
Message Name: update
Entity: cf_incidentbusinessprocess
Filter attribute: activesateid.
Event stage: pre-operation
Register Image: PreIamge

Once you have completed your plugin and registered it. You can simply test it by moving to the next stage without having the required document. You will receive the below error.

Until user not provides the document he will not be able to move to the next stage


You can write a plugin to prevent a user from moving to the next stage.

Written by

Subhash Mahato

Technical Consultant

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.

Want to streamline your business processes?

  • This field is for validation purposes and should be left unchanged.

Recent Articles

  • Dynamics 365 Client Diagnostics

    15 March’ 2018

    Main cause of Performance Issues: Bandwidth and latency are the primary characteristics which affects the performance o...

    Read more
  • Closing Blind Shift in MPOS and CPOS in Dynamics 365 for Retail

    15 March’ 2018

    Manual For closing Blind shift in POS: Blind shifts terminate the currently ongoing shift and when logged in a new shif...

    Read more
  • Persistent Filters in the Power BI Service

    13 March’ 2018

    Introduction: The feature is finally release, and it is power BI has announced general availability of persistent filt...

    Read more
  • Cause and Solution for Scribe MSMQ not receiving Message from AX

    10 March’ 2018

    Issue: Microsoft Message Queuing (MSMQ) service running on Server might be unable to receive messages. Therefore, messa...

    Read more
  • User Privileges on SharePoint – D365 Document Integration

    10 March’ 2018

    Overview: Often, we wonder what could be wrong where we see a generic error on Documents in Dynamics 365. Something lik...

    Read more