Skip to content

MobileCRM.ManyToManyReference.remove

rescocrm edited this page May 15, 2023 · 9 revisions

Removes an existing N-N relationship between the two passed entities.

Relationship is removed either from local database or using the online request. It depends on current application mode.

Arguments

Argument Type Description
entityName String The relationship entity name.
ref1 MobileCRM.Reference First entity instance.
ref2 MobileCRM.Reference Second entity instance.
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.

This example demonstrates how to remove an existing N-N relationship between competitor and product entities.

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