Today when I was working with Real-time workflows, got a doubt that which will be executed first where a plugin and workflow are registered on the same event.
Went ahead and came to know that Plugins are executed first and then the workflows.
Here is what I did for knowing this.
Created a Single line of text field on the Account entity.
- Created a plugin and registered it on the Post Create event of Account and written code to update it with “Plugin” text.
- Created a RealTime workflow and added a step to update the new field with “RealTimeWorkflow”.
- Created a .csv file which has some accounts and imported it to CRM.
- Opened Advanced Find and checked the details. Found that the field is updated with RealTimeWorkflow value which confirms that workflow is the one that is executed after the plugin.
Hope this helps.