Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ms dyn crm associate n:m record js

var manyToManyAssociateRequest = {
    getMetadata: () => ({
        boundParameter: null,
        parameterTypes: {},
        operationType: 2,
        operationName: "Associate"
    }),


    relationship: "jaj_role_contact",


    target: {
        entityType: "contact",
        id: "c83aab0f-6863-ea11-a811-000d3aba6eaf"
    },
    
    relatedEntities: [
        {
            entityType: "jaj_role",
            id: "aae3175e-cb63-ea11-a811-000d3aba6eaf"
        },
        {
            entityType: "jaj_role",
            id: "ace3175e-cb63-ea11-a811-000d3aba6eaf"
        }
    ]

}


Xrm.WebApi.online.execute(manyToManyAssociateRequest).then(
    (success) => {
        console.log("Success", success);
    },
    (error) => {
        console.log("Error", error);
    }
)
Source by www.linkedin.com #
 
PREVIOUS NEXT
Tagged: #ms #dyn #crm #associate #record #js
ADD COMMENT
Topic
Name
4+9 =