Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

How to delete system-created relationships?

  • 1.  How to delete system-created relationships?

    SILVER CONTRIBUTOR
    Posted Jan 04, 2019 05:13 PM
    ​​I need to delete a custom entity. However, it has Dependencies  on system-created relationships.
    Examples are N:1 relationships like CreatedBy User (lk_new_xxxx_createdby), ModifiedBy User, Owning Team, Owning Business Unit and 1:N relationships like new_xxxx_ASyncOperations new_xxxx_Process Session.
    CRM will not let me delete these relationships, saying "Only custom relationships can be updated or deleted."

    How can I delete the system dependencies so I can delete the custom entity?

    #CustomerEngagement


    ------------------------------
    Allison Briden
    Business Systems Analyst
    Energy Trust of Oregon
    Portland OR
    ------------------------------


  • 2.  RE: How to delete system-created relationships?

    TOP CONTRIBUTOR
    Posted Jan 06, 2019 02:42 PM
    I have seen this kind of behavior before and from what I have seen on other discussions, it was only possible to remove the dependencies through custom code. I seem to recall having to ask MS support to remove a dependency a few years ago.

    ------------------------------
    Nelson Johnson
    Solution Architect
    BroadPoint Technologies, LLC
    Bethesda MD
    ------------------------------



  • 3.  RE: How to delete system-created relationships?

    Posted Jan 07, 2019 02:19 AM
    You just delete the custom entity and then CRM looks after these relationships. That is how it has always worked. Just make sure you don't have any Duplicate detection rules/setting turned on and that you have System Admin role. Also, make sure no workflow sitting in a waiting or suspended state.

    Also, do yourself a favour and use a prefix applicable to your site - don't use "new" please

    ------------------------------
    Peter Hale
    Naish Pty Ltd
    ------------------------------



  • 4.  RE: How to delete system-created relationships?

    GOLD CONTRIBUTOR
    Posted Jan 07, 2019 02:55 AM
    I agree.

    Delete the custom entity and the system takes care of the relationships. I've never tried or had to remove those system relationships individually.

    If you aren't able to delete the custom entity, please post any messages that you get so that we may assist further.

    ------------------------------
    Feridun Kadir
    Principal Consultant, MVP
    Expert CRM Services Ltd
    Stansted
    ------------------------------



  • 5.  RE: How to delete system-created relationships?

    Posted Jan 07, 2019 04:08 AM
    Also review the fields used by the custom entities and you will probably discover some lookups that reference the system entities.  If so delete the field and then this will clean up the relationship.  May not apply but wanted to check you have reviewed this already.

    ------------------------------
    Michael Nunes

    ------------------------------



  • 6.  RE: How to delete system-created relationships?

    GOLD CONTRIBUTOR
    Posted Jan 07, 2019 03:44 AM
    Have you tried looking at any forms for the entity, and removing any links from the "navigation" section? This effectively shows all the relationships, and I've found some instances where the presence of them here prevents the entity from being deleted. If you want to delete the entity, just delete all the navigation from the form, as you're going to remove this anyway.

    ------------------------------
    Tom Pickles
    Dynamics CRM Analyst
    ICAS
    EDINBURGH
    ------------------------------



  • 7.  RE: How to delete system-created relationships?

    SILVER CONTRIBUTOR
    Posted Jan 07, 2019 01:17 PM
    Thanks to all for your suggestions!
    In addition to the system-created relationships, there was one custom relationship to another custom entity that I deleted. After I deleted that relationship, I had not published customizations, and I was still unable to delete the custom entity. When I went back and published customizations, I was able to delete the entity, although the out of the box relationships remained.

    ------------------------------
    Allison Briden
    Business Systems Analyst
    Energy Trust of Oregon
    Portland OR
    ------------------------------