web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

Team record ownership, plugin execution account

(0) ShareShare
ReportReport
Posted on by

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? 

I have the same question (0)
  • CRMJetty Profile Picture
    3,512 on at

    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-context
    www.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.

  • Suggested answer
    Abhishek Dhoriya Profile Picture
    1,013 on at

    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.

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    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/

  • Community Member Profile Picture
    on at

    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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 45 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 27 Most Valuable Professional

#3
Soundari Profile Picture

Soundari 15

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans