Notifications
Announcements
No record found.
Hi,
I have a record for a custom entity created by an automated process that sets the owner to a team (prior triggering the _service.create call).
During the creation process, it triggers a bunch of plug-ins (pre-create, post-create and post-update). What I have found is that the post-update plugin that creates a related record runs under the the first individual user account in the Team that owns the original record. Does anyone know why this is the case and how to avoid it?
Hi Rodney,
In regards to your concern, you can refer below link for plugin call in user context/accountability:
community.dynamics.com/.../d365-v9-x-quick-tip-how-to-run-a-plugin-in-system-user-contextwww.inkeysolutions.com/.../docs.microsoft.com/.../tutorial-write-plug-in
I hope it helps,
Thanks.
Please mark as verified if the answer is helpful. Welcome to join hot discussions in Dynamics 365.
Entity Ownership in Microsoft Dynamics CRM 365
Entity Ownership in Microsoft Dynamics CRM 365 - Interview Questions
Please mark this Answer as VERIFIED, if you find this video article helpful.
Post create plugin Run in Context is set to calling user then it will run under the context of triggering/initiated user, What I mean by triggering/initiating user is the user who triggers the event.
In your case it is a automated process, so I would request you to check the user under which automated process is running.
What is your end goal requirement?
You want to run your post create plugin under which user comtext?
Please mark my answer verified if this is helpful!
Regards,
Bipin Kumar
Follow my Blog: xrmdynamicscrm.wordpress.com/
That's my point, it's not running under the triggering/initated user. I have a command line application that adds records to D365, it runs under a CRM Administrator Account. It creates records and assigns them to a team. When the Post Update plugin runs for the newly created record it context.userid is a user account that I am not expected. The user account is a user that has not been with the organisation for almost 2 years.
I suspect that this is because the record is created and owned by a Team, D365 is grabbing the first person in the team to trigger the Post update plugin which seems odd.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 45 Super User 2025 Season 2
Daniyal Khaleel 27 Most Valuable Professional
Soundari 15