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 :
Microsoft Dynamics CRM (Archived)

Entity Ownership Type Change

(0) ShareShare
ReportReport
Posted on by 420

Hello,

Is there an easy way to change the custom entity ownership type from org to user or team?

Many thanks.

*This post is locked for comments

I have the same question (0)
  • Royal King Profile Picture
    27,686 on at

    I'm afraid there is a easy way to fix this issue. If you want to give a try modifying ownership using exported customization try with below steps

    1.create a new solution and add only this entity to the solution and export it , after this delete the entity from the system and edit the exported customization to change ownership of the entity by comparing other user owned entity customization and import it. Try this on dev environment if everything works fine import the customization to new environment.

  • Suggested answer
    Guido Preite Profile Picture
    54,086 Moderator on at

    it's not possible to change the ownership type after the entity is created.

    you need to delete and recreate the entity.

  • Vrushali R Profile Picture
    30 on at

    How to change the entity ownership in preoperation -create plugin to Team?

  • Suggested answer
    Pawar Pravin  Profile Picture
    5,237 on at

    Hi Vrushali,

    With the help of "context.InputParameters["Target"]" you could achieve your requirement.

    Pass team guid dynamically as a parameter to the target entity.

  • Suggested answer
    Community Member Profile Picture
    on at

    there is no supported way to change the ownership after creating and saving the entity.

    all you can do is to export the entity customization and update the XML,

    refer to this link on how to change the XML http://www.crmcs.co.uk/content/change-a-custom-entities-ownership-in-crm.aspx

  • Vrushali R Profile Picture
    30 on at

    Hi Pravin

    I could do it in prevalidation step. However would like to understand what you are proposing? can you write exactly how to pass the parameter to target entity?

    Thanks

    Vrushali

  • Vrushali R Profile Picture
    30 on at

    We can use the assign method and change the ownership post creation of entity, my requirement was to change the owner before saving the record. Record can be created either manually or through import.

  • Suggested answer
    Pawar Pravin  Profile Picture
    5,237 on at

    Vrushali, please refer below code for your reference:

    var entity = (Entity)context.InputParameters["Target"];
    
    Guid TeamGuid = //Pass Team guid here dynamically;
    entity.Attributes["ownerid"] = new EntityReference("systemuser", TeamGuid);
    
    context.InputParameters["Target"] = entity;

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans