-
Notifications
You must be signed in to change notification settings - Fork 26
MobileCRM.ManyToManyReference.remove
rescocrm edited this page Aug 2, 2024
·
10 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.
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);
});