Reputation: 8194
When registering a plugin against Dynamics CRM you can specify the Execution Order (also known as Rank).
Execution Order
Specifies the order, also known as rank, that plug-ins are executed within a pipeline stage. Plug-ins registered with an order value of 1 are executed first, followed by plug-ins registered with an order of 2, and so on. However, if there is more than one plug-in in a stage with the same order value, then the plug-in with the earliest compilation date is called first.
I want to check the value of this from inside the plugin, can I do so, and how?
Upvotes: 2
Views: 648
Reputation: 22836
Yes you can, not directly from Plugin Execution Context but using another retrieve service call.
var rank = service.Retrieve("sdkmessageprocessingstep",context.OwningExtension.Id,new ColumnSet(new[] { "rank" })).GetAttributeValue<int>("rank");
Upvotes: 3