Skip to content

Commit 1d7aabe

Browse files
committed
Related articles
1 parent beda3a7 commit 1d7aabe

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

powerapps-docs/developer/data-platform/best-practices/business-logic/avoid-batch-requests-plugin.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ search.audienceType:
3030

3131
## Symptoms
3232

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.
3434

3535

3636
<a name='guidance'></a>

powerapps-docs/developer/data-platform/bulk-operations.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,13 @@ Multiple records with the same primary key or alternate key values in the payloa
224224

225225
### UpsertMultiple
226226

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.
228228

229229
##### [SDK for .NET](#tab/sdk)
230230

231231
Uses the [UpsertMultipleRequest class](xref:Microsoft.Xrm.Sdk.Messages.UpsertMultipleRequest).
232232

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.
235234

236235
```csharp
237236
/// <summary>
@@ -299,6 +298,8 @@ Record Updated
299298
Record Created
300299
```
301300

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+
302303
#### SDK examples
303304

304305
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
367368

368369
`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`.
369370

371+
These queries will not return results for the `UpsertMultiple` message. A table that supports both `CreateMultiple` and `UpdateMultiple` will support `UpsertMultiple`.
372+
370373
#### Duplicate records in UpsertMultiple Targets parameter
371374

372375
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
589592

590593
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).
591594

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+
592597
## Troubleshooting common errors
593598

594599
If you encounter errors while using bulk operations, please refer to the following articles:

0 commit comments

Comments
 (0)