web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Removing N:N relationships in XRMToolbox

(0) ShareShare
ReportReport
Posted on by 1,328

Hello, I've recently done an import in XRM Toolbox to create new N:N relationships, but now I would like to remove those relationships. Is this an available function in XRM Toolbox? Would it be possible that when I import the file, it would remove the specified relationship rather than create it?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi,

    I'm not sure if you can do it through the toolbox, but it's super easy to do in CRM itself. Navigate to one of the entities, click on N:N relationships, select the one you don't want and click Delete.

    If this was helpful, I'd appreciate if you would mark this as the verified answer.

    Thanks,

     Aiden

  • epark06 Profile Picture
    1,328 on at

    Thanks for the help, but the issue is I need to remove over 6000. Is this possible in CRM?

  • Suggested answer
    Aiden Kaskela Profile Picture
    19,696 on at

    6000 relationships? If you have a list of the relationship names, you can do it through the SDK by looping through and making a call with the DeleteRelationshipRequest like this:

    DeleteRelationshipRequest deleteManyToManyRelationshipRequest = 
        new DeleteRelationshipRequest
    {
        Name = "new_accounts_campaigns"
    };
    
    _serviceProxy.Execute(deleteManyToManyRelationshipRequest);
    


  • Aileen Gusni Profile Picture
    44,524 on at

    epark,

    You want to remove relationship (metadata) or diassociate it only (without delete the record)?

    Thanks

  • epark06 Profile Picture
    1,328 on at

    I would like to disassociate the relationship only.

  • Aileen Gusni Profile Picture
    44,524 on at

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.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans