Support Portal ContactGet in touch

Change a Custom Entities Ownership in CRM

   Words by James Binnie

   on 12/07/2016 17:28:02

When it comes to creating a custom Entity in Dynamics CRM, the possibilities are quite possibly endless. One of the reasons for writing this blog comes from an initial setting that is mandatory for all customer Entities – Ownership. As shown below there are only 2 settings to choose from, Organization or User or Team, both have valid uses depending on the Entities purpose or how flat the organization security model is…the choice is yours.

clip_image001[4]

So you pick Organization for Ownership, a good choice when you have initially spec’d out the Entity with the Client – However what happens if you find that the security model demands User or Team level security? If you’re still in Dev, you could opt to just rebuild the Entity, if you have already gone live as I had done before writing this blog, you will find the below very useful.

Changing Entity Ownership from Organization to User or Team Owned – Methodology

This method is suited better for multi-environment deployments of CRM (i.e. Dev, UAT, Live).

  • You will need to create a solution containing your Entity that requires modifying ( I would include components as it makes for a much smoother import process)
  • Export your solution and store in a safe place
  • Export the same solution again
  • Find your solution and unpack the file using WinZip or something similar
  • Copy the Customization XML to the desktop 
  • Open the File with either Visual Studio or you can even use Notepad 
  • Follow the 3 steps below to edit the XML

XML Change #1

Change the OwnershipTypeMask tag from ‘OrgOwned’ to ‘UserOwned’

clip_image002[4]

* Tip – use Ctrl + F to find the correct location easily

XML Change #2

Remove the 'OrganizationId' field from the XML for the offending Entity.

clip_image003[4]

XML Change #3

Remove the Relationship linking the Entity to the Organization – stripping out the EntityRelationship tag entirely:

clip_image004[4]

That’s it – CRM 2015 is then clever enough to see the Entity is now User or Team Owned and create the required OwnerId and OwnerIdName fields in the background during the XML Import.

  • Save the file and then add the Customization XML back into the Solution zip file
  • Your target CRM environment will need to have this entity removed before we Import.
  • This is for all environments not just for the initial re-import
  • Back up any data for the entity you wish to keep
  • It’s always best practice to have a rollback point – so back up any Entity and Components before deleting
  • If you have a test environment, deploy the modified Solution there, Import the data back up and test – Does changing the Entity Ownership give you the results you were looking for?
  • Once happy repeat the Entity deletion in the Live CRM environment and import the newly modified version of Entity from the Dev/UAT environment, Import the data and test.

Following these steps should turn a potential headache into an easy success – whether it’s during a new CRM system build or part of on-going CRM system support, this is a useful tool to have in your arsenal!

Share this Article

Search Articles

Filter Articles

CRM Tech DocMan

Recent Articles

CRMCS Quick Start Guide: How To Produce a Microsoft Teams Live Event Dynamics 365 Marketing: Lead Scoring and Sales Acceptance Designing and Developing Microsoft Power Apps Portals Thank You for Attending CRMCS’ Webinar - Achieving B2B sales excellence with Dynamics 365 & Microsoft Teams Thank You for Attending Our Webinar - Achieving B2B sales excellence with Dynamics 365 & Microsoft Teams Webinar: Discover How CRMCS Have United Dynamics 365, SharePoint and Microsoft Teams To Create Sales Excellence Ignite your workflow by adding DocDrive365 to Office 365 The CRMCS guide to everything you need to know about integrating Teams with Dynamics 365 Saving Time By Keeping Documents In One Place TDE Database Encryption with On Premise Dynamics The Key to Successful Compliance in 2020 Part 2: Let’s get GDPR Compliant with Microsoft Power Automate Top 3 Essential Tips for Remote Working Dynamics 365 Marketing: Top 5 Best Features Dynamics Day in the Life - Puma Investments Can you use Teams to amplify collaboration in Dynamics? Part 1: Using a Scheduled Power Automate to Trigger Expiry Date Reminders The secrets of successful document collaboration in Dynamics CRMCS launches new AppSource approved DocDrive365 Dynamics Day in the Life - Moneypenny Release Management Add the App to Dynamics DocDrive365 Security: Day One - Getting Started with Dynamics to SharePoint Permissions Building a New Scheduled Process using Flow
  • "Paul has made a real difference to how my team of 24 people record and store valuable customer data and sales opportunities. Highly recommended."

    James, Operations Director

  • "Understanding your business allows us to advise when to implement aspects of CRM and, likewise, when not to."

    Paul McQuillan, Managing Director

  • "Dynamics 365 and CRMCS have made a real lasting difference to our business, allowing us to replace older systems that were holding back our performance."

    Grahame, Chief Operating Officer

  • "James worked well with us to help connect CRM with Outlook and relate how this might benefit our team using CRM for Property Care."

    Natalie, Property Care Supervisor

  • "Matt was really good with helping us run User Testing on the new Compliance Module of our CRM System."

    Tom, Compliance Administrator

Prefer to go old-school?

Write to us using the below addresses.

Head Office
CRM Consultancy
61 Oxford Street
Manchester
M1 6EQ

London Office
CRM Consultancy London
Grosvenor Avenue
London

Content © CRM Consultancy.