Notifications
Announcements
No record found.
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'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.
it's not possible to change the ownership type after the entity is created.
you need to delete and recreate the entity.
How to change the entity ownership in preoperation -create plugin to Team?
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.
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
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
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.
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.
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.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2