Skip to content

Commit 07e1807

Browse files
committed
addressed review comments
1 parent befccda commit 07e1807

File tree

1 file changed

+8
-8
lines changed
  • powerapps-docs/developer/model-driven-apps/clientapi/reference/Xrm-WebApi/online

1 file changed

+8
-8
lines changed

powerapps-docs/developer/model-driven-apps/clientapi/reference/Xrm-WebApi/online/execute.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -567,12 +567,12 @@ var relatedEntities = [
567567
}
568568
];
569569

570-
// The name of the relationship to use for this association.
570+
// The name of the existing relationship to associate on.
571571
var relationship = "new_account_contact";
572572

573-
var m2mAssociateRequest = new Sdk.AssociateRequest(target, relatedEntities, relationship)
573+
var manyToManyAssociateRequest = new Sdk.AssociateRequest(target, relatedEntities, relationship)
574574

575-
Xrm.WebApi.online.execute(m2mAssociateRequest).then(
575+
Xrm.WebApi.online.execute(manyToManyAssociateRequest).then(
576576
function(result) {
577577
if (result.ok) {
578578
console.log("Status: %s %s", result.status, result.statusText);
@@ -590,7 +590,7 @@ Xrm.WebApi.online.execute(m2mAssociateRequest).then(
590590
The following code sample demonstrates how to perform a Disassociate operation on collection-valued navigation properties (Many-To-One and Many-To-Many relationships). For single-valued navigation properties (One-To-Many relationships a.k.a Lookup fields), you can perform an Update operation as shown above or use [Xrm.WebApi.updateRecord](../updateRecord.md).
591591

592592
> [!NOTE]
593-
> Unlike the Associate operation which allows adding references to multiple related entity records, the Disassociate operation is limited to only one related record's entity reference per operation.
593+
> Unlike the Associate operation which allows associating the target entity record with multiple related entity records in a single operation, the Disassociate operation is limited to only disassociating one entity record from the target entity record per operation.
594594
595595
```JavaScript
596596
var Sdk = window.Sdk || {};
@@ -610,7 +610,7 @@ Sdk.DisassociateRequest.prototype.getMetadata = function() {
610610
return {
611611
boundParameter: null,
612612
parameterTypes: {},
613-
operationType: 2,
613+
operationType: 2, // Associate and Disassociate fall under the CRUD umbrella
614614
operationName: "Disassociate"
615615
}
616616
};
@@ -624,12 +624,12 @@ var target = {
624624
// The GUID of the related entity record to disassociate.
625625
var relatedEntityId = "180a9aad-7619-eb11-8dff-000d3ac5c7f9";
626626

627-
// The relationship to use for this disassociation.
627+
// The name of the existing relationship to disassociate from.
628628
var relationship = "new_account_contact";
629629

630-
var m2mDisassociateRequest = new Sdk.DisassociateRequest(target, relatedEntityId, relationship)
630+
var manyToManyDisassociateRequest = new Sdk.DisassociateRequest(target, relatedEntityId, relationship)
631631

632-
Xrm.WebApi.online.execute(m2mDisassociateRequest).then(
632+
Xrm.WebApi.online.execute(manyToManyDisassociateRequest).then(
633633
function(result) {
634634
if (result.ok) {
635635
console.log("Status: %s %s", result.status, result.statusText);

0 commit comments

Comments
 (0)