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);
}
)
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);
}
)