Customer Engagement & Dynamics CRM Forum

Expand all | Collapse all

Same Emails and Notes Referenced by 2 Separate Entities

  • 1.  Same Emails and Notes Referenced by 2 Separate Entities

    TOP CONTRIBUTOR
    Posted 01-10-2019 06:32 AM
    I'm in a situation where I think I need to delete some System relationships before I delete a custom entity.  In this other thread someone mentioned having to have MS do it.  Customer Engagement & Dynamics CRM Forum

    Here is the situation:  I had a custom entity E1 with organization security and in the end i needed it to be User/Team security.  As far as I know this cannot be 'changed' in a supported way.  I did find an unsupported way which involved exporting the entity in a solution making a bunch of updates to it and importing it back in.  Taking the path of least resistance I simply created a new entity E2.

    I then exported the records from E1 and imported them into E2, including the original records primary key GUID.  Not sure why, just out of habit I guess.  Then when reviewing the records in E2 I noticed email activities and notes against the E2 records which I did not import.  After some testing I found that if I add/update/delete an email or note from any E1 record the same result appears against the E2 record and visa versa.  Both entities are sharing the same email and notes records.

    Now I need to delete the E1 entity, but if i delete an E1 record the System relationship cascades that delete to the email and notes records.  Other than getting MS to delete the System relationships, does anyone know of a way I could prevent the email and note records from being deleted when the E1 entity is deleted?

    Any help is appreciated,

    ------------------------------
    Jim Corriveau
    A.W. Chesterton Company
    Groveland MA
    ------------------------------


  • 2.  RE: Same Emails and Notes Referenced by 2 Separate Entities

    TOP CONTRIBUTOR
    Posted 01-16-2019 08:33 AM
    Hi Jim,

    You can change the cascading behavior on the 1:N relationships between the entity you are trying to delete and email and note records. Switch it to Cascade None under delete and you should be good to go!

    ------------------------------
    Gus Gonzalez
    7x Microsoft MVP, CRMUG All-Star
    CEO, Elev8 Solutions
    ------------------------------



  • 3.  RE: Same Emails and Notes Referenced by 2 Separate Entities

    TOP CONTRIBUTOR
    Posted 01-16-2019 10:34 AM
    Gus,

    The 1:N relationships from the custom entity E1 to Notes and Emails are both read only.  The same is true for N:1 relationships from Notes and Emails to E1.  Is there a way to make them read/write?

    Thanks for taking time to look at this.




    ------------------------------
    Jim Corriveau
    A.W. Chesterton Company
    Groveland MA
    ------------------------------