Wednesday 5 June 2019

Rank / Execution Order of synchronous / real-time workflows in Dynamics 365

There's a "rank" field in the sdkmessageprocessingstep entity.  (You can see the entity through Advanced Find but you don't seem to be able to access that field, which has a display name of Execution Order.)


I'm using online Dynamics 365 / CRM / Customer Engagement,
Version 1710 (9.1.0.5424) online

XrmToolBox has an "Synchronous events execution order" plug-in that (as of XrmToolBox version 1.2019.2.32 with Synchronous events execution order editor v 1.2016.8.23) lets you connect and set the rank on synchronous workflows (note that they only appear registered on the create event of the entity) but FAILS TO READ the existing rank out of the CRM correctly.

You can confirm the rank has been set by creating a solution, adding your workflow, then exporting.
Customizations.Xml contains (e.g.)
<StateCode>1</StateCode>
<StatusCode>2</StatusCode>
<Rank>50</Rank>
<RunAs>1</RunAs>
<IsTransacted>1</IsTransacted>



[Maybe see also...
https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/entities/sdkmessageprocessingstep#BKMK_Rank
and the one sensible answer on
https://community.dynamics.com/crm/f/117/t/154063 ]