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/configure-entity-relationship-cascading-behavior.md
+45-37Lines changed: 45 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ suite: powerapps
5
5
author: NHelgren
6
6
ms.author: nhelgren
7
7
ms.topic: article
8
-
ms.date: 04/25/2023
8
+
ms.date: 06/01/2023
9
9
ms.subservice: dataverse-developer
10
10
search.audienceType:
11
11
- developer
@@ -27,7 +27,7 @@ More information: [Create a One-to-Many relationship using Web API](webapi/creat
27
27
28
28
## Using Organization Service to configure cascading behavior
29
29
30
-
When you use <xref:Microsoft.Xrm.Sdk.Messages.CreateOneToManyRequest> or <xref:Microsoft.Xrm.Sdk.Messages.UpdateRelationshipRequest> you include an instance of a <xref:Microsoft.Xrm.Sdk.Metadata.OneToManyRelationshipMetadata> class in the body of the request. In the <xref:Microsoft.Xrm.Sdk.Metadata.OneToManyRelationshipMetadata.CascadeConfiguration> property of that class you use the <xref:Microsoft.Xrm.Sdk.Metadata.CascadeConfiguration> class.
30
+
When you use <xref:Microsoft.Xrm.Sdk.Messages.CreateOneToManyRequest> or <xref:Microsoft.Xrm.Sdk.Messages.UpdateRelationshipRequest>, you include an instance of a <xref:Microsoft.Xrm.Sdk.Metadata.OneToManyRelationshipMetadata> class in the body of the request. In the <xref:Microsoft.Xrm.Sdk.Metadata.OneToManyRelationshipMetadata.CascadeConfiguration> property of that class you use the <xref:Microsoft.Xrm.Sdk.Metadata.CascadeConfiguration> class.
31
31
32
32
The `CascadeConfiguration` (<xref:Microsoft.Xrm.Sdk.Metadata.CascadeConfiguration> class or <xref:Microsoft.Dynamics.CRM.CascadeConfiguration?text=CascadeConfiguration ComplexType>) contains the properties representing actions that may be performed on the referenced table in the one-to-many relationship. Each property can be assigned one of the values of the <xref:Microsoft.Dynamics.CRM.CascadeType?text=CascadeType EnumType>.
33
33
@@ -42,7 +42,7 @@ The `CascadeConfiguration` (<xref:Microsoft.Xrm.Sdk.Metadata.CascadeConfiguratio
42
42
43
43
**Active Records considered for Cascading action**
44
44
45
-
Cascading actions on active records will only include records that have a state code of "Active". The following State Codes for these tables, are considered Active for Cascade actions. Different labels (other than Active) may be used for this state code in different tables. Any custom state or status code with values other than below will not be processed as an active record for cascading purposes.
45
+
Cascading actions on active records only include records that have a state code of "Active". The following State Codes for these tables, are considered Active for Cascade actions. Different labels (other than Active) may be used for this state code in different tables. Any custom state or status code with values other than below won't be processed as an active record for cascading purposes.
46
46
47
47
| Table Name | State Code 0 | State Code 1 | State Code 2 | State Code 3 |
|Assign|The referenced table record owner and/or business unit is changed.|Active<br />Cascade<br />NoCascade<br />UserOwned|
81
81
|Delete|The referenced table record is deleted. **Note:** The options for this action are limited.|Cascade<br />RemoveLink<br />Restrict|
82
-
|Merge|The record is merged with another record. **Note:** For referenced tables that can be merged, Cascade is the only valid option. In other cases use NoCascade.|Cascade<br />NoCascade|
82
+
|Merge|The record is merged with another record. **Note:** For referenced tables that can be merged, Cascade is the only valid option. In other cases, use NoCascade.|Cascade<br />NoCascade|
83
83
|Reparent|See [About the reparent action](#about-the-reparent-action) later.|Active<br />Cascade<br />NoCascade<br />UserOwned|
84
84
|Share|When the referenced table record is shared with another user.|Active<br />Cascade<br />NoCascade<br />UserOwned|
85
85
|Unshare|When sharing is removed for the referenced table record.|Active<br />Cascade<br />NoCascade<br />UserOwned|
@@ -97,10 +97,11 @@ The `CascadeConfiguration` (<xref:Microsoft.Xrm.Sdk.Metadata.CascadeConfiguratio
97
97
> if they want to continue using it.
98
98
99
99
### About the assign action
100
-
The assign action allows the owner, the Owning Business Unit or both owner and business unit updates to be cascaded down to all child records when the parent record is updated.
100
+
101
+
The assign action allows the owner, the Owning Business Unit, or both owner and business unit updates to be cascaded down to all child records when the parent record is updated.
101
102
102
103
#### Allowed record ownership across business units not enabled
103
-
When the [allow record ownership across business units](/power-platform/admin/wp-security-cds#to-enable-this-matrix-data-access-structure-preview)is not enabled, the Owning Business Unit column can't be explicitly updated when changing the record's owner. The following lists the cascading behaviors when the parent's record owner is updated.
104
+
When the [allow record ownership across business units](/power-platform/admin/wp-security-cds#to-enable-this-matrix-data-access-structure-preview)isn't enabled, the Owning Business Unit column can't be explicitly updated when changing the record's owner. The following lists the cascading behaviors when the parent's record owner is updated.
104
105
105
106
If you update the owner:
106
107
@@ -112,10 +113,11 @@ If you update the owner:
112
113
- Cascade assign set to None
113
114
- Record owner is updated to the new owner
114
115
- Record business unit is updated to new owner's business unit
115
-
- Child records' owner is not updated (no cascade)
116
-
- Child records' business unit is not updated (no cascade)
116
+
- Child records' owner isn't updated (no cascade)
117
+
- Child records' business unit isn't updated (no cascade)
117
118
118
119
#### Allowed record ownership across business units is enabled
120
+
119
121
When [allow record ownership across business units](/power-platform/admin/wp-security-cds#to-enable-this-matrix-data-access-structure-preview) is enabled,
120
122
the Owning Business Unit column can be explicitly updated when changing the record's owner. The following lists the cascading behaviors when the parent's record owner and/or the business unit is updated.
121
123
@@ -133,23 +135,23 @@ the Owning Business Unit column can be explicitly updated when changing the reco
133
135
- Cascade assign set to None
134
136
- Record owner is updated to the new owner
135
137
- Record business unit is updated to new owner's business unit
136
-
- Child records' owner is not updated (no cascade)
137
-
- Child records' business unit is not updated (no cascade)
138
+
- Child records' owner isn't updated (no cascade)
139
+
- Child records' business unit isn't updated (no cascade)
- Record business unit is updated to new business unit
146
-
- Child records' owner is not updated
148
+
- Child records' owner isn't updated
147
149
- Child records' business unit is updated to new business unit
148
150
- Cascade assign set to None
149
-
- Record owner is not updated
151
+
- Record owner isn't updated
150
152
- Record business unit is updated to new business unit
151
-
- Child records' owner is not updated
152
-
- Child records' business unit is not updated
153
+
- Child records' owner isn't updated
154
+
- Child records' business unit isn't updated
153
155
154
156
3. If you update the owner and business unit:
155
157
@@ -163,11 +165,12 @@ the Owning Business Unit column can be explicitly updated when changing the reco
163
165
- Cascade assign set to None
164
166
- Record owner is updated to the new owner
165
167
- Record business unit is updated to new business unit
166
-
- Child records' owner is not updated
167
-
- Child records' business unit is not updated
168
+
- Child records' owner isn't updated
169
+
- Child records' business unit isn't updated
168
170
169
171
#### Change the cascade behaviors with the OrgDBSettings AlwaysMoveRecordToOwnerBusinessUnit
170
-
You can set **AlwaysMoveRecordToOwnerBusinessUnit** to false; the user owned records' Business unit is not moved to the new user's business unit.
172
+
173
+
You can set **AlwaysMoveRecordToOwnerBusinessUnit** to false; the user owned records' Business unit isn't moved to the new user's business unit.
171
174
172
175
**AlwaysMoveRecordToOwnerBusinessUnit** can be set in [environment database settings](/power-platform/admin/environment-database-settings) and can also be set using the [OrgDBOrgSettings tool for Microsoft Dynamics CRM](https://support.microsoft.com/help/2691237/orgdborgsettings-tool-for-microsoft-dynamics-crm).
173
176
@@ -177,29 +180,29 @@ You can set **AlwaysMoveRecordToOwnerBusinessUnit** to false; the user owned rec
177
180
178
181
- Default cascade assign behavior (cascade all)
179
182
- Record owner is updated to the new owner
180
-
- Record business unit is not updated
183
+
- Record business unit isn't updated
181
184
- Child records' owner is updated to the new owner
182
-
- Child records' business unit is not updated
185
+
- Child records' business unit isn't updated
183
186
- Cascade assign set to None
184
187
- Record owner is updated to the new owner
185
-
- Record business unit is not updated
186
-
- Child records' owner is not updated
187
-
- Child records' business unit is not updated
188
+
- Record business unit isn't updated
189
+
- Child records' owner isn't updated
190
+
- Child records' business unit isn't updated
188
191
189
192
2. If you update the business unit:
190
193
191
194
**AlwaysMoveRecordToOwnerBusinessUnit** = false
192
195
193
196
- Default cascade assign behavior (cascade all)
194
-
- Record owner is not updated
197
+
- Record owner isn't updated
195
198
- Record business unit is updated to new business unit
196
-
- Child records' owner is not updated
199
+
- Child records' owner isn't updated
197
200
- Child records' business unit is updated to new business unit
198
201
- Cascade assign set to None
199
-
- Record owner is not updated
202
+
- Record owner isn't updated
200
203
- Record business unit is updated to new business unit
201
-
- Child records' owner is not updated
202
-
- Child records' business unit is not updated
204
+
- Child records' owner isn't updated
205
+
- Child records' business unit isn't updated
203
206
204
207
3. If you update the owner and business unit:
205
208
@@ -213,8 +216,8 @@ You can set **AlwaysMoveRecordToOwnerBusinessUnit** to false; the user owned rec
213
216
- Cascade assign set to None
214
217
- Record owner is updated to the new owner
215
218
- Record business unit is updated to new business unit
216
-
- Child records' owner is not updated
217
-
- Child records' business unit is not updated
219
+
- Child records' owner isn't updated
220
+
- Child records' business unit isn't updated
218
221
219
222
> [!NOTE]
220
223
> When **AlwaysMoveRecordToOwnerBusinessUnit** = false
@@ -233,12 +236,15 @@ You can set **AlwaysMoveRecordToOwnerBusinessUnit** to false; the user owned rec
233
236
234
237
<aname="BKMK_ReparentAction"></a>
235
238
236
-
### About the reparent action
237
-
The reparent action is very similar to the share action except that it deals with the inherited access rights instead of explicit access rights. The reparent action is when you change the value of the referencing column in a parental relationship. When a reparent action occurs, the desired scope of the inherited access rights for related tables might change for ReadAccess, WriteAccess, DeleteAccess, AssignAccess, ShareAccess, AppendAccess and AppendToAccess. It will not change for CreateAccess. The cascade actions related to the reparent action refer to changes to access rights indicated above for the table record and any table records related to it.
239
+
### About the reparent action
240
+
241
+
The reparent action is similar to the share action except that it deals with the inherited access rights instead of explicit access rights. The reparent action is when you change the value of the referencing column in a parental relationship. When a reparent action occurs, the desired scope of the inherited access rights for related tables might change for ReadAccess, WriteAccess, DeleteAccess, AssignAccess, ShareAccess, AppendAccess and AppendToAccess. It doesn't change for CreateAccess. The cascade actions related to the reparent action refer to changes to access rights indicated above for the table record and any table records related to it.
242
+
243
+
<aname="BKMK_MergeAction"></a>
244
+
245
+
### About the merge action
238
246
239
-
<aname="BKMK_MergeAction"></a>
240
-
### About the merge action
241
-
The merge action can sometimes have problems completing if a record that is part of the operation set is deleted while the merge system job is running. Often this will result in an error indicating that the record will be "differently parented" or the child record "might lose its parenting". If this occurs, and you would prefer the merge continue forward even if the record is missing, you can choose to disable the parent check when you select the columns to merge.
247
+
The merge action can sometimes have problems completing if a record that is part of the operation set is deleted while the merge system job is running. Often this results in an error indicating that the record will be "differently parented" or the child record "might lose its parenting". If this occurs, and you would prefer the merge continue forward even if the record is missing, you can choose to disable the parent check when you select the columns to merge.
242
248
243
249
244
250
> [!NOTE]
@@ -250,8 +256,10 @@ You can use two cascade async notification helper messages to provide notificati
250
256
251
257
The two notification messages are:
252
258
253
-
-``cascadeAsync_FailureAPI`` <br/>This message is processed (executed) when an asynchronous cascade job is paused due to multiple failures. This can be used to inform users they need to review their dataset for issues with existing plug-ins, data issues, or workflow problems.
254
-
-``cascadeAsync_SuccessAPI`` <br/>This message is processed (executed) when the asynchronous cascade job is successfully completed. This is helpful to let users know when longer running jobs are finished.
259
+
|Name|Description|
260
+
|---------|---------|
261
+
|`cascadeAsync_FailureAPI`|This message is processed (executed) when an asynchronous cascade job is paused due to multiple failures. This can be used to inform users they need to review their dataset for issues with existing plug-ins, data issues, or workflow problems.<br />**InputParameters**:<br />`casadeAsyncExceptionDetails`: Details of the exception causing cascade async job failure.<br />`casadeAsyncJobName`:Name of the cascade async job.|
262
+
|`cascadeAsync_SuccessAPI`|This message is processed (executed) when the asynchronous cascade job is successfully completed.<br />**InputParameters**:<br />`casadeAsync_JobName`: Name of the cascade async job.|
255
263
256
264
The custom plug-in must be registered during the post-operation stage and must be set to asynchronous mode. The following figure shows an example plug-in registration using the Plug-in Registration tool.
0 commit comments