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)

Link & D-link the records in subgrid through javascript

(0) ShareShare
ReportReport
Posted on by 19

Link & D-link the records in subgrid through javascript

*This post is locked for comments

I have the same question (0)
  • Saad Kabarousse Profile Picture
    734 on at

    In this Example i'll use relation between Incident and PhoneCall which is Many To Many. which i guess is the case for you too.

    Use this for the Associate Request:

    SDK.REST.associateRecords("9CBCF511-3B9E-E911-80EB-001DD8B71CF5", "Incident", "Incident_Phonecalls", "9CBCF511-3B9E-E911-80EB-001DD8B71CF5", "PhoneCall", function() {

       //Success - No Return Data - Do Something

    }, function(error) {

       Xrm.Utility.alertDialog(error.message);

    });

    and this for the dissssociate request:

    SDK.REST.disassociateRecords("9CBCF511-3B9E-E911-80EB-001DD8B71CF5", "Incident", "Incident_Phonecalls", "9CBCF511-3B9E-E911-80EB-001DD8B71CF5", function() {

       //Success - No Return Data - Do Something

    }, function(error) {

       Xrm.Utility.alertDialog(error.message);

    });

    you can use the Crm Rest Builder Solution to Build all of your javascript requests:

    github.com/.../CRMRESTBuilder

    Hope this will help :)

    If this answered your question, please make sure to Mark this as an Answer.

  • Suggested answer
    Kalpavruksh D365 CoE Profile Picture
    2,545 on at

    Hi Amit,

    If you are referring to associate and disassociate the record using javascript please refer this link: http://himbap.com/blog/?p=2063
    Also, can you please provide more details on your requirement, so we can help you better. pastedimage1562665466768v1.png
  • Suggested answer
    Pawar Pravin  Profile Picture
    5,237 on at

    Hi Amit,

    Do you mean to say that those entities having N-N relationship ?

    If yes then use associate and dissociate requests to link and d-link subgrid records as mentioned in below blog:

    lucianodangelo.blogspot.com/.../crm-2016-web-api-operations.html

    If its 1-N relationship then you need to use create and delete request.

    Please refer below url for reference:

    pravinpawarweb.wordpress.com/.../

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