Recently in a migration project, we had a requirement to implement an override on Owner field.
We used plugins to achieve this and started getting following error message:
Changing security attributes is not allowed in stage 20 plugins.
Plugin was set in Pre-Create stage.
Trying to find solutions some of the approaches that came across were:
· Turn plugin into Post-Create: This would not suit my case.
· Check plugin stage before running the assignment operation:
· Turn plugin into Pre-Validate stage.
I suggested the third route and it worked like a Charm.
CRM Tip: If you would like to understand about Pre-validation stage, here is a quick description from a great old colleague of mine: https://rajeevpentyala.com/tag/pre-validate/
Hope it helps and Happy CRMing!
Follow me on social channels: