Recently we had to write a plugin that should trigger only when a user has manually associated the record from the form (N-N relationship). This was because we were also doing the same association through another plugin, in which case we didn’t want this new plugin to trigger.
Here we can make use of ParentContext property to identify if the plugin is getting triggered because of another plugin.
Below we can see ParentContext property getting populated and also in the InitiatingUserId property we get the id of the user who triggered the plugin.
And if the user has manually performed the association from the form, we can see ParentContext being null.
Hope it helps..
One thought on “ParentContext property of IPluginExecutionContext – Dynamics 365 / Dataverse”