Skip to content

Commit dbb323a

Browse files
authored
Merge pull request #8405 from MicrosoftDocs/main
Sally - latest from Main
2 parents 6fe2146 + b575df1 commit dbb323a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+596
-959
lines changed

.openpublishing.redirection.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
{
22
"redirections": [
3+
{
4+
"source_path": "powerapps-docs/developer/data-platform/webapi/enhanced-quick-start.md",
5+
"redirect_url": "get-started-dynamics-365-web-api-csharp",
6+
"redirect_document_id": "false"
7+
},
8+
{
9+
"source_path": "powerapps-docs/developer/data-platform/webapi/start-web-api-project-visual-studio-csharp.md",
10+
"redirect_url": "get-started-dynamics-365-web-api-csharp",
11+
"redirect_document_id": "false"
12+
},
313
{
414
"source_path": "powerapps-docs/developer/data-platform/org-service/azure-storage-partitioning-sdk.md",
515
"redirect_url": "../elastic-tables",
Loading
Loading
Binary file not shown.

powerapps-docs/developer/data-platform/optional-parameters.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Use optional parameters (Microsoft Dataverse) | Microsoft Docs"
33
description: "Use optional parameters to control operation behaviors"
4-
ms.date: 05/27/2023
4+
ms.date: 06/28/2023
55
ms.reviewer: jdaly
66
ms.topic: article
77
author: divkamath
@@ -222,6 +222,9 @@ More information:
222222

223223
Use the `tag` parameter to include a shared variable value that is accessible within a plug-in. This extra information allows a plug-in to apply logic that depends on the client application.
224224

225+
> [!NOTE]
226+
> This parameter is intended for client applications to be able to set any value they wish. No Microsoft feature should require that you set a specific value in your client application code to enable different behaviors.
227+
225228
To access the value in a plug-in, use the [IExecutionContext.SharedVariables collection](xref:Microsoft.Xrm.Sdk.IExecutionContext.SharedVariables)
226229

227230
```csharp

powerapps-docs/developer/data-platform/org-service/entity-operations-update-delete.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ Target = account
290290
};
291291

292292
//The existing entity is updated.
293-
var response2 = (UpsertResponse)svc.Execute(request1);
293+
var response2 = (UpsertResponse)svc.Execute(request2);
294294
Console.WriteLine("Record Created: {0}", response2.RecordCreated); //false
295295
```
296296

powerapps-docs/developer/data-platform/register-plug-in.md

Lines changed: 44 additions & 93 deletions
Large diffs are not rendered by default.

powerapps-docs/developer/data-platform/scalable-customization-design/database-transactions.md

Lines changed: 53 additions & 59 deletions
Large diffs are not rendered by default.

powerapps-docs/developer/data-platform/scalable-customization-design/overview.md

Lines changed: 32 additions & 36 deletions
Large diffs are not rendered by default.

powerapps-docs/developer/data-platform/use-change-tracking-synchronize-data-external-systems.md

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: "Use change tracking to synchronize data with external systems (Microsoft Dataverse) | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
3-
description: "The change tracking feature provides a way to keep the data synchronized in an efficient manner by detecting what data has changed since the data was initially extracted or last synchronized" # 115-145 characters including spaces. This abstract displays in the search result.
4-
ms.date: 04/19/2023
2+
title: "Use change tracking to synchronize data with external systems (Microsoft Dataverse) | Microsoft Docs"
3+
description: "The change tracking feature provides a way to keep the data synchronized in an efficient manner by detecting what data has changed since the data was initially extracted or last synchronized."
4+
ms.date: 06/23/2023
55
ms.reviewer: pehecke
66
ms.topic: article
7-
author: Peakerbl # GitHub ID
7+
author: paulliew
88
ms.subservice: dataverse-developer
9-
ms.author: peakerbl # MSFT alias of Microsoft employees only
9+
ms.author: paulliew
1010
search.audienceType:
1111
- developer
1212
contributors:
@@ -22,23 +22,29 @@ The change tracking feature in Microsoft Dataverse provides a way to keep the da
2222

2323
Before retrieving the changes for a table, make sure that the change tracking is enabled for that table.
2424

25-
You can check whether this feature is enabled or enable it by using [Power Apps](https://make.powerapps.com/?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc). Select **Data** > **Tables** and the specific table. Under **Advanced options** you will find the **Track changes** property.
25+
You can check whether this feature is enabled or enable it by using [Power Apps](https://make.powerapps.com/?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc). Select **Data** > **Tables** and the specific table. Under **Advanced options** you'll find the **Track changes** property.
2626

27-
You can set this programmatically by setting the <xref:Microsoft.Xrm.Sdk.Metadata.EntityMetadata.ChangeTrackingEnabled?text=EntityMetadata.ChangeTrackingEnabled Property> to `True`.
27+
You can set this programmatically by setting the [EntityMetadata.ChangeTrackingEnabled Property](xref:Microsoft.Xrm.Sdk.Metadata.EntityMetadata.ChangeTrackingEnabled) to `True`.
2828

2929
> [!NOTE]
3030
> Once change tracking has been enabled for a table, it is not possible to disable it.
3131
3232
For more information on how to use [Power Apps](https://make.powerapps.com/?utm_source=padocs&utm_medium=linkinadoc&utm_campaign=referralsfromdoc): [Create and edit tables using Power Apps](../../maker/data-platform/create-edit-entities-portal.md)
3333

34-
There are two ways to check whether change tracking is enabled for a table using Web API.
34+
There are two ways to check whether change tracking is enabled for a table using the Dataverse Web API.
3535

36-
1. You can query `EntityDefinitions` with the following GET request:
36+
1. You can query `EntityDefinitions` with the following `GET` request:
3737

3838
```http
3939
GET [Organization URI]/api/data/v9.2/EntityDefinitions?$select=SchemaName&$filter=ChangeTrackingEnabled eq true
4040
```
4141

42+
There are system tables with change tracking enabled, for example [Auditing (Audit)](reference/entities/audit.md). You can use the following query to see the full list:
43+
44+
```http
45+
GET [Organization URI]/api/data/v9.2/EntityDefinitions?$filter=ChangeTrackingEnabled eq true and IsCustomEntity eq false&$select=LogicalName
46+
```
47+
4248
More information: [Query table definitions using the Web API](webapi/query-metadata-web-api.md)
4349

4450
1. Find this information in the Web API $metadata service document. The annotation `Org.OData.Capabilities.V1.ChangeTracking` is set for entity sets that have change tracking enabled.
@@ -49,7 +55,7 @@ There are two ways to check whether change tracking is enabled for a table using
4955
GET [Organization URI]/api/data/v9.2/$metadata?annotations=true
5056
```
5157

52-
Those entity sets which represent tables where change tracking is enabled will have this annotation:
58+
Those entity sets that represent tables where change tracking is enabled have this annotation:
5359

5460
```xml
5561
<Annotation Term="Org.OData.Capabilities.V1.ChangeTracking">
@@ -63,7 +69,7 @@ There are two ways to check whether change tracking is enabled for a table using
6369

6470
### Tables not eligible for change tracking
6571

66-
Some tables cannot be enabled for change tracking. You can check if a table is eligible for change tracking by checking the [EntityMetadata.CanChangeTrackingBeEnabled](xref:Microsoft.Xrm.Sdk.Metadata.EntityMetadata.CanChangeTrackingBeEnabled) managed property value. To see which tables cannot be enabled for change tracking, use this Web API query:
72+
Some tables can't be enabled for change tracking. You can check if a table is eligible for change tracking by checking the [EntityMetadata.CanChangeTrackingBeEnabled](xref:Microsoft.Xrm.Sdk.Metadata.EntityMetadata.CanChangeTrackingBeEnabled) managed property value. To see which tables can't be enabled for change tracking, use this Web API query:
6773

6874
```http
6975
GET [Organization URI]/api/data/v9.2/EntityDefinitions?$select=SchemaName,ChangeTrackingEnabled&$filter=ChangeTrackingEnabled eq false and CanChangeTrackingBeEnabled/Value eq false
@@ -76,9 +82,9 @@ More information:
7682

7783
## Retrieve changes for a table using the Web API
7884

79-
Changes made in tables can be tracked using Web API requests by adding the `Prefer: odata.track-changes` header. This header requests that a _delta link_ be returned which can subsequently be used to retrieve table changes.
85+
Changes made in tables can be tracked using Web API requests by adding the `Prefer: odata.track-changes` header. This header requests that a _delta link_ is returned which can later be used to retrieve table changes.
8086

81-
Delta links are opaque, service-generated links that the client uses to retrieve subsequent changes to a result. They are based on a defining query that describes the set of results for which changes are being tracked. For example, the request that generated the results containing the delta link. The delta link encodes the collection of tables for which changes are being tracked, along with a starting point from which to track changes. More information: [Oasis OData Version 4.0 - Delta Links](https://docs.oasis-open.org/odata/odata/v4.0/cs01/part1-protocol/odata-v4.0-cs01-part1-protocol.html#_Toc365046305)
87+
Delta links are opaque, service-generated links that the client uses to retrieve subsequent changes to a result. They're based on a defining query that describes the set of results for which changes are being tracked. For example, the request that generated the results containing the delta link. The delta link encodes the collection of tables for which changes are being tracked, along with a starting point from which to track changes. More information: [Oasis OData Version 4.0 - Delta Links](https://docs.oasis-open.org/odata/odata/v4.0/cs01/part1-protocol/odata-v4.0-cs01-part1-protocol.html#_Toc365046305)
8288

8389
### Retrieve changes in tables using Web API example
8490

@@ -116,7 +122,7 @@ Preference-Applied: odata.track-changes
116122
}
117123
```
118124

119-
The `@odata.deltaLink` Uri returned from the above example can be used to fetch changes in tables. In this example a new account was created and an existing account deleted. The delta link returned from the previous request fetches these changes, as shown in the example below.
125+
The `@odata.deltaLink` Uri returned from the above example can be used to fetch changes in tables. In this example, a new account was created and an existing account deleted. The delta link returned from the previous request fetches these changes, as shown in the example below.
120126

121127
**Request**
122128

@@ -169,22 +175,22 @@ Content-Type: application/json
169175

170176
### Query options not supported in Change Tracking Web API request
171177

172-
System query options `$filter`, `$orderby`, `$expand` and `$top` are not supported when using the `Prefer: odata.track-changes` header in Web API request. An error message: `The \"${filter|orderby|expand|top}\" query parameter isn't supported when Change Tracking is enabled.` will be returned when using these query options in the Web API request.
178+
System query options `$filter`, `$orderby`, `$expand` and `$top` aren't supported when using the `Prefer: odata.track-changes` header in a Web API request. An error message: `The \"${filter|orderby|expand|top}\" query parameter isn't supported when Change Tracking is enabled.` is returned when using these query options in the Web API request.
173179

174180
## Retrieve changes for a table using .NET SDK
175181

176-
When change tracking is enabled for a table, you can use the `RetrieveEntityChanges` message with the <xref:Microsoft.Xrm.Sdk.Messages.RetrieveEntityChangesRequest?text=RetrieveEntityChangesRequest Class> to retrieve the changes for that table.
182+
When change tracking is enabled for a table, you can use the `RetrieveEntityChanges` message with the [RetrieveEntityChangesRequest Class](xref:Microsoft.Xrm.Sdk.Messages.RetrieveEntityChangesRequest) to retrieve the changes for that table.
177183

178184
The first time this message is used it returns all records for the table and that data can be used to populate the external storage. The message also returns a version number that will be sent back with the next use of the `RetrieveEntityChanges` message so that only data for those changes that occurred since that version will be returned.
179185

180186
You should be aware of the following constraints when retrieving changes for a table:
181187

182-
- Only one table will be tracked in retrieve changes. If `RetrieveEntityChanges` is executed with no version / or token, the server will treat it as the system minimum version, returning all of the records as new. Deleted objects won't be returned.
183-
- Changes will be returned if the last token is within a default value of 30 days. This is controlled by the value of the [Organization table ExpireChangeTrackingInDays column](reference/entities/organization.md#BKMK_ExpireChangeTrackingInDays) and can be changed. If there are unprocessed changes older than the configured value, the system will throw an exception.
184-
- If a client has a set of changes for a table, say version 1, a record is created and deleted prior to the next query for changes, they will get the deleted item even if they didn't have the item to begin with.
185-
- Records are retrieved in the order determined by server side logic. Usually, the caller will always get all new or updated records first (sorted by version number) followed by deleted records. If there are 3000 records created or updated and 2000 records deleted, Dataverse returns a collection of 5000 records, which have the first 3000 entries comprised of new or updated records and the last 2000 entries for deleted records.
188+
- Only one table is tracked in retrieve changes. If `RetrieveEntityChanges` is executed with no version / or token, the server treats it as the system minimum version, returning all of the records as new. Deleted objects are not returned.
189+
- Changes are returned if the last token is within a default value of 30 days. This duration is controlled by the value of the [Organization table ExpireChangeTrackingInDays column](reference/entities/organization.md#BKMK_ExpireChangeTrackingInDays) and can be changed. If there are unprocessed changes older than the configured value, the system throws an exception.
190+
- If a client has a set of changes for a table, say version 1, a record is created and deleted before the next query for changes, they'll get the deleted item even if they didn't have the item to begin with.
191+
- Records are retrieved in the order determined by server side logic. Usually, the caller will get all new or updated records first (sorted by version number) followed by deleted records. If there are 3,000 records created or updated and 2,000 records deleted, Dataverse returns a collection of 5,000 records, which have the first 3,000 entries comprised of new or updated records and the last 2,000 entries for deleted records.
186192
- If the new or updated item collection is greater than 5000, the user can page through the collection.
187-
- The calling user must have organization level read access to the table. If the user has limited read access, the system will throw a privilege check error.
193+
- The calling user must have organization level read access to the table. If the user has limited read access, the system throws a privilege check error.
188194

189195
### .NET SDK Sample code
190196

0 commit comments

Comments
 (0)