Skip to content

MobileCRM.ManyToManyReference.addRecord

rescocrm edited this page May 15, 2023 · 9 revisions

Adds or removes an N-N relationship record between the two passed entities.

Arguments

Argument Type Description
entityName String The relationship entity name.
ref1 MobileCRM.Reference First entity instance.
ref2 MobileCRM.Reference Second entity instance.
create Boolean Whether to create or delete the relationship record.
success function(result) A callback function for successful asynchronous result.
failed function(error) A callback function for command failure. The error argument will carry the error message.
scope A scope for calling the callbacks; set "null" to call the callbacks in global scope.

[Obsolete]This example demonstrates how to create or remove N-N relationship between contact and account entities.

var competitor = new MobileCRM.Reference("competitor", competitorid);
var product = new MobileCRM.Reference("product", productid);
MobileCRM.ManyToManyReference.addRecord("competitorproduct", competitor, product, function () { onCreated(); }, function (err) { showError(err); });
Clone this wiki locally