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/best-practices/business-logic/avoid-batch-requests-plugin.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ search.audienceType:
30
30
31
31
## Symptoms
32
32
33
-
Due to their long-running nature, using <xref:Microsoft.Xrm.Sdk.Messages.ExecuteMultipleRequest> or<xref:Microsoft.Xrm.Sdk.Messages.ExecuteTransactionRequest>message request classes within the context of a plug-in or workflow activity expose sandbox-isolated plug-in types to the two-minute (120000ms) channel timeout exception and can degrade the user experience for synchronous registrations.
33
+
Due to their long-running nature, using <xref:Microsoft.Xrm.Sdk.Messages.ExecuteMultipleRequest>, <xref:Microsoft.Xrm.Sdk.Messages.ExecuteTransactionRequest>, <xref:Microsoft.Xrm.Sdk.Messages.CreateMultipleRequest>, <xref:Microsoft.Xrm.Sdk.Messages.UpdateMultipleRequest>, or <xref:Microsoft.Xrm.Sdk.Messages.UpsertMultipleRequest>message request classes within the context of a plug-in or workflow activity expose sandbox-isolated plug-in types to the two-minute (120000ms) channel timeout exception and can degrade the user experience for synchronous plug-in step registrations.
Copy file name to clipboardExpand all lines: powerapps-docs/developer/data-platform/bulk-operations.md
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -224,14 +224,13 @@ Multiple records with the same primary key or alternate key values in the payloa
224
224
225
225
### UpsertMultiple
226
226
227
-
Use `Upsert` to integrate data with external sources when you don't know whether the table exists in Dataverse or not.`Upsert` operations frequently depend on alternate keys to identify records. Use `UpsertMultiple` to perform `Upsert` operations in bulk.
227
+
Use `Upsert` to integrate data with external sources when you don't know whether the table exists in Dataverse or not.`Upsert` operations frequently depend on alternate keys to identify records. Use `UpsertMultiple` to perform `Upsert` operations in bulk.
228
228
229
229
##### [SDK for .NET](#tab/sdk)
230
230
231
231
Uses the [UpsertMultipleRequest class](xref:Microsoft.Xrm.Sdk.Messages.UpsertMultipleRequest).
232
232
233
-
This static `UpsertMultipleExample` method depends on a `samples_bankaccount`table that has a string column named
234
-
`samples_accountname` configured as an alternate key. It also has a string column named `samples_description`. This code uses the [Entity constructor that sets the keyName and keyValue](use-alternate-key-reference-record.md#using-the-entity-class) to specify the alternate key value.
233
+
This static `UpsertMultipleExample` method depends on a `samples_bankaccount` table that has a string column named `samples_accountname` configured as an alternate key. It also has a string column named `samples_description`. This code uses the [Entity constructor that sets the keyName and keyValue](use-alternate-key-reference-record.md#using-the-entity-class) to specify the alternate key value.
235
234
236
235
```csharp
237
236
/// <summary>
@@ -299,6 +298,8 @@ Record Updated
299
298
Record Created
300
299
```
301
300
301
+
Whether a record is created or updated in this example depends on whether records exist with the matching `sample_keyattribute` value. No data is returned to indicate whether a record was created or updated.
302
+
302
303
#### SDK examples
303
304
304
305
Within [Sample: SDK for .NET Use bulk operations](org-service/samples/create-update-multiple.md), look for the [UpsertMultiple project](https://github.com/microsoft/PowerApps-Samples/blob/master/dataverse/orgsvc/C%23-NETCore/BulkOperations/UpsertMultiple/README.md)
@@ -367,6 +368,8 @@ OData-Version: 4.0
367
368
368
369
`UpsertMultiple` is available for tables that support `CreateMultiple` and `UpdateMultiple`. This includes all elastic tables. The queries found in [Availability with standard tables](bulk-operations.md#availability-with-standard-tables) will not return results for `UpsertMultiple`, but you can use them to detect whether a table supports both `CreateMultiple` and `UpdateMultiple`.
369
370
371
+
These queries will not return results for the `UpsertMultiple` message. A table that supports both `CreateMultiple` and `UpdateMultiple` will support `UpsertMultiple`.
372
+
370
373
#### Duplicate records in UpsertMultiple Targets parameter
371
374
372
375
Multiple records with the same primary key or alternate key values in the payload are not supported with `UpsertMultiple`. When more than one record in the `Targets` parameter is uniquely identified by a primary or alternate key, `UpsertMultiple` will return an error. [This behavior is different from `UpdateMultiple`](#duplicate-records-in-updatemultiple-targets-parameter).
@@ -589,6 +592,8 @@ The default timeout set using ServiceClient is 4 minutes, which is long for any
589
592
590
593
At this time, we don't support using bulk operation messages in plug-ins. More information: [Don't use batch request types in plug-ins and workflow activities](best-practices/business-logic/avoid-batch-requests-plugin.md).
591
594
595
+
However, you *should* write plug-ins for the `CreateMultiple` and `UpdateMultiple` messages as describe in [Write plug-ins for CreateMultiple and UpdateMultiple](write-plugin-multiple-operation.md).
596
+
592
597
## Troubleshooting common errors
593
598
594
599
If you encounter errors while using bulk operations, please refer to the following articles:
0 commit comments