You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: powerapps-docs/developer/data-platform/webapi/associate-disassociate-entities-using-web-api.md
+22-22Lines changed: 22 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: "Associate and disassociate tables using the Web API (Microsoft Dataverse)| Microsoft Docs"
2
+
title: "Associate and disassociate table rows using the Web API (Microsoft Dataverse)| Microsoft Docs"
3
3
description: "Read how to add a reference to a collection-valued navigation property, remove a reference, and change an existing reference using the Web API"
4
4
ms.custom: ""
5
5
ms.date: 05/03/2021
@@ -22,7 +22,7 @@ search.app:
22
22
- D365CE
23
23
---
24
24
25
-
# Associate and disassociate tables using the Web API
25
+
# Associate and disassociate table rows using the Web API
@@ -32,7 +32,7 @@ There are several methods you can use to associate and disassociate tables (enti
32
32
33
33
## Add a reference to a collection-valued navigation property
34
34
35
-
The following example shows how to associate an existing opportunity entity with the `opportunityid` value of `00000000-0000-0000-0000-000000000001` to the collection-valued `opportunity_customer_accounts` navigation property for an account entity with the `accountid` value of `00000000-0000-0000-0000-000000000002`. This is a 1:N relationship but you can perform the same operation for an N:N relationship.
35
+
The following example shows how to associate an existing opportunity with the `opportunityid` value of `00000000-0000-0000-0000-000000000001` to the collection-valued `opportunity_customer_accounts` navigation property for an account with the `accountid` value of `00000000-0000-0000-0000-000000000002`. This is a 1:N relationship but you can perform the same operation for an N:N relationship.
36
36
37
37
**Request**
38
38
```http
@@ -59,7 +59,7 @@ OData-Version: 4.0
59
59
60
60
## Change the reference in a single-valued navigation property
61
61
62
-
You can associate entities by setting the value of a single-valued navigation property using PUT request with the following pattern.
62
+
You can associate rows by setting the value of a single-valued navigation property using PUT request with the following pattern.
63
63
64
64
**Request**
65
65
@@ -83,11 +83,11 @@ OData-Version: 4.0
83
83
```
84
84
85
85
86
-
<aname="bkmk_Removeareferencetoanentity"></a>
86
+
<aname="bkmk_Removeareferencetoarow"></a>
87
87
88
-
## Remove a reference to a table
88
+
## Remove a reference to a table row
89
89
90
-
Use a DELETE request to remove a reference to an entity. The way you do it is different depending on whether you’re referring to a collection-valued navigation property or a single-valued navigation property.
90
+
Use a DELETE request to remove a reference to a row. The way you do it is different depending on whether you’re referring to a collection-valued navigation property or a single-valued navigation property.
91
91
92
92
**Request**
93
93
For a collection-valued navigation property, use the following.
@@ -126,23 +126,23 @@ HTTP/1.1 204 No Content
126
126
OData-Version: 4.0
127
127
```
128
128
129
-
<aname="bkmk_Associateentitiesoncreate"></a>
129
+
<aname="bkmk_Associaterowsoncreate"></a>
130
130
131
-
## Associate tables on create
131
+
## Associate table rows on create
132
132
133
-
As described in [Associate table rows on create](create-entity-web-api.md#associate-table-rows-on-create), you can associate the new record to existing records by setting the navigation properties using the `@odata.bind` annotation.
133
+
As described in [Associate rows on create](create-entity-web-api.md#associate-table-rows-on-create), you can associate the new row to existing rows by setting the navigation properties using the `@odata.bind` annotation.
134
134
135
-
As described in [Create related tables in one operation](create-entity-web-api.md#bkmk_CreateRelated), new entities can be created with relationships using *deep insert*.
135
+
As described in [Create related tables in one operation](create-entity-web-api.md#bkmk_CreateRelated), new tables can be created with relationships using *deep insert*.
136
136
137
-
## Associate and disassociate tables on update
137
+
## Associate and disassociate table rows on update
138
138
139
-
You can set the value of single-valued navigation properties using `PATCH` to associate or disassociate records.
139
+
You can set the value of single-valued navigation properties using `PATCH` to associate or disassociate rows.
140
140
141
-
<aname="bkmk_Associateentitiesonupdate"></a>
141
+
<aname="bkmk_Associaterowsonupdate"></a>
142
142
143
-
### Associate tables on update
143
+
### Associate table rows on update
144
144
145
-
You can associate entities on update using the same message described in [Basic update](update-delete-entities-using-web-api.md#bkmk_update) but you must use the `@odata.bind` annotation to set the value of a single-valued navigation property. The following example changes the account associated to an opportunity using the `customerid_account` single-valued navigation property.
145
+
You can associate rows on update using the same message described in [Basic update](update-delete-entities-using-web-api.md#bkmk_update) but you must use the `@odata.bind` annotation to set the value of a single-valued navigation property. The following example changes the account associated to an opportunity using the `customerid_account` single-valued navigation property.
146
146
147
147
**Request**
148
148
@@ -165,7 +165,7 @@ HTTP/1.1 204 No Content
165
165
OData-Version: 4.0
166
166
```
167
167
168
-
### Disassociate tables on update
168
+
### Disassociate table rows on update
169
169
170
170
You can remove a reference to a single-valued navigation property when updating by setting the value to `null`. This method allows you to disassociate multiple references in a single operation.
171
171
There are two ways to do this:
@@ -203,14 +203,14 @@ OData-Version: 4.0
203
203
204
204
More information: [Basic update](update-delete-entities-using-web-api.md#basic-update)
## Associate tables on update using collection-valued navigation property
208
+
## Associate table rows on update using collection-valued navigation property
209
209
210
-
The following example shows how to associate multiple existing [ActivityParty](../reference/entities/activityparty.md)entities with an [Email](../reference/entities/email.md) entity using collection-valued navigation property `email_activity_parties`.
210
+
The following example shows how to associate multiple existing [ActivityParty](../reference/entities/activityparty.md) with an [Email](../reference/entities/email.md) using collection-valued navigation property `email_activity_parties`.
211
211
212
212
> [!NOTE]
213
-
> Associating multiple entities with an entity on update is a special scenario that is possible only with <xref:Microsoft.Dynamics.CRM.activityparty?text=activityparty EntityType />.
213
+
> Associating multiple tables with a table on update is a special scenario that is possible only with <xref:Microsoft.Dynamics.CRM.activityparty?text=activityparty EntityType />.
214
214
215
215
**Request**
216
216
@@ -260,4 +260,4 @@ OData-Version: 4.0
260
260
[Impersonate another user using the Web API](impersonate-another-user-web-api.md)
261
261
[Perform conditional operations using the Web API](perform-conditional-operations-using-web-api.md)
Copy file name to clipboardExpand all lines: powerapps-docs/developer/data-platform/webapi/update-delete-entities-using-web-api.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@ OData-Version: 4.0
72
72
```
73
73
74
74
> [!NOTE]
75
-
> See [Associate and disassociate tables on update](associate-disassociate-entities-using-web-api.md#associate-and-disassociate-tables-on-update) for information about associating and disassociating entities on update.
75
+
> See [Associate and disassociate tables on update](associate-disassociate-entities-using-web-api.md#associate-and-disassociate-table-rows-on-update) for information about associating and disassociating entities on update.
76
76
77
77
<aname="bkmk_updateWithDataReturned"></a>
78
78
@@ -175,7 +175,7 @@ OData-Version: 4.0
175
175
```
176
176
177
177
> [!NOTE]
178
-
> This can’t be used with a single-valued navigation property to disassociate two entities. For an alternative approach, see [Remove a reference to a table](associate-disassociate-entities-using-web-api.md#bkmk_Removeareferencetoanentity).
178
+
> This can’t be used with a single-valued navigation property to disassociate two entities. For an alternative approach, see [Remove a reference to a table](associate-disassociate-entities-using-web-api.md#bkmk_Removeareferencetoarow).
|[Section 1: Basic create and update operations](#bkmk_section1)|[Basic create](create-entity-web-api.md#bkmk_basicCreate) <br /> [Create with data returned](create-entity-web-api.md#bkmk_createWithDataReturned) <br /> [Basic update](update-delete-entities-using-web-api.md#bkmk_update) <br /> [Update with data returned](update-delete-entities-using-web-api.md#bkmk_updateWithDataReturned)|
43
-
|[Section 2: Create with association](#bkmk_section2)|[Associate entities on create](associate-disassociate-entities-using-web-api.md#bkmk_Associateentitiesoncreate)|
43
+
|[Section 2: Create with association](#bkmk_section2)|[Associate entities on create](associate-disassociate-entities-using-web-api.md#bkmk_Associaterowsoncreate)|
44
44
|[Section 3: Create related entities (deep insert)](#bkmk_section3)|[Create related entities in one operation](create-entity-web-api.md#bkmk_CreateRelated)|
45
-
|[Section 4: Associate and disassociate existing entities](#bkmk_section4)|[Associate and disassociate entities using the Web API](associate-disassociate-entities-using-web-api.md)|
45
+
|[Section 4: Associate and disassociate existing entities](#bkmk_section4)|[Associate and disassociate table rows using the Web API](associate-disassociate-entities-using-web-api.md)|
0 commit comments