
Greetings Everyone,
On a custom entity, I have a field (Single Line) on which it contains specific data, a plugin is fired.
However during closure of a record on that entity (from a On-Demand Dialog), the field is going under the update-event which is causing the plugin to execute twice.
It a an OOB WF which is updating (or setting) the value on the Single Line field ONLY during CREATE of record.
However, I could see on the Audit History that the field is being updated from elsewhere.
Is there any workaround/solution to avoid this in D365?
*This post is locked for comments
I have the same question (0)Hello,
Can you check the Depth of the plugin ? I assume that if it is triggered twice you should get a Depth = 0 for the first execution and Depth = 1 on the second one.
You could filter the execution of the Plugin logic based on that value (this is used to avoid infinite loop or too many executions of the same plugin).
You can have a look at this great article : crmbusiness.wordpress.com/.../stopping-infinite-plugins-with-parameters-depth-and-parentcontext
Regards,
Clément