locked
Delete all N:N relationships RRS feed

  • Question

  • Hi

    I have a N:N relationship between a custom entity and contact. I need to delete all of these relationships at once. Is there a way to do it? Any links please. Thanks a binch.

    Thursday, December 2, 2010 8:30 PM

Answers

All replies

  • You could just delete the relationship itself.  All connections held by the relationship will permanently and immediately disappear.  If you want to use the relationship in the future, just recreate it.
    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    Thursday, December 2, 2010 9:35 PM
    Moderator
  • I am not sure of the impact of this on the production environment. While I investigate that, could you please share the class used to delete/create a n:n relationship.

    Also, if you have any links that point to delete the data in a an:n relation, could you please share that too. I think this seems to be safer. Right ?

     

     

     

    Thursday, December 2, 2010 9:47 PM
  • I have some N:N Relationship utility code in both Javascript and C# that may prove helpful to you.

    Dave Berry - MVP Dynamics CRM - http:\\crmentropy.blogspot.com
    Thursday, December 2, 2010 9:48 PM
    Moderator