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: .github/README.md
+25-3Lines changed: 25 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1113,14 +1113,27 @@ As mentioned before, by default, all operations that modify data: CREATE, UPDATE
1113
1113
1114
1114
In some cases this can be an undesirable behaviour and with v2 there are several ways to make those operations non-atomic: per batch operation and per request. Let's use a code sample above and make **all** operations non-atomic. It can be done by setting `inChangeSet` property to `false`.
1115
1115
1116
+
**Important!** `contentId` can **only** be used inside the Change Sets. Any `contentId` set in a request won't be included in a non-atomic batch operation! If `$1` parameter was used outside of Change Set you will get an error similar to the following: `ErroridentifiedinPayloadprovidedbytheuserforEntity :'<entity name>'`.
1117
+
1116
1118
Per batch operation:
1117
1119
1118
1120
```ts
1121
+
const contact = {
1122
+
firstname: "John",
1123
+
lastname: "Doe"
1124
+
};
1125
+
1126
+
const order = {
1127
+
name: "1 year membership",
1128
+
//reference a request in a navigation property
1129
+
//"[email protected]": "$1" <--- commented out because we don't want to get an error
**Important!** There seem to be a bug in Dynamics 365 Web Api (Checked: July 16, 2023) where it does not process the last operation in a batch request (Change Sets work fine). As a workaround, you can add any "GET" operation at the end to make it work, like in the following example. Please let me know if this bug was fixed.
1149
+
1135
1150
Per request:
1136
1151
1137
1152
```ts
1138
1153
dynamicsWebApi.startBatch();
1139
1154
dynamicsWebApi.create({
1140
1155
data: contact,
1141
1156
collection: "contacts",
1142
-
contentId: "1",
1143
1157
inChangeSet: false//<--- do not include in a change set
1144
1158
});
1145
1159
dynamicsWebApi.create({
@@ -1148,6 +1162,13 @@ dynamicsWebApi.create({
1148
1162
inChangeSet: false//<--- do not include in a change set
1149
1163
});
1150
1164
1165
+
//this is a workaround a D365 bug (checked on July 16, 2023)
/** Sets Prefer header to "odata.continue-on-error" that allows more requests be processed when errors occur. The batch request will return '200 OK' and individual response errors will be returned in the batch response body. */
/**v.1.7.5+ If set to true, the request bypasses custom business logic, all synchronous plug-ins and real-time workflows are disabled. Check for special exceptions in Microsft Docs. */
434
+
/**If set to true, the request bypasses custom business logic, all synchronous plug-ins and real-time workflows are disabled. Check for special exceptions in Microsft Docs. */
434
435
bypassCustomPluginExecution?: boolean;
435
436
/**Web API v9+ only! Boolean that enables duplicate detection. */
/**BATCH REQUESTS ONLY! Sets Content-ID header or references request in a Change Set. */
452
453
contentId?: string;
453
-
/**v.1.7.7+ A unique partition key value of a logical partition for non-relational custom entity data stored in NoSql tables of Azure heterogenous storage. */
454
+
/**A unique partition key value of a logical partition for non-relational custom entity data stored in NoSql tables of Azure heterogenous storage. */
/**v.1.7.5+ If set to true, the request bypasses custom business logic, all synchronous plug-ins and real-time workflows are disabled. Check for special exceptions in Microsft Docs. */
458
+
/**If set to true, the request bypasses custom business logic, all synchronous plug-ins and real-time workflows are disabled. Check for special exceptions in Microsft Docs. */
458
459
bypassCustomPluginExecution?: boolean;
459
460
/**Web API v9+ only! Boolean that enables duplicate detection. */
/**A String representing navigation property's Primary Key (GUID) or Alternate Key(s). (For example, to retrieve Attribute Metadata). */
480
481
navigationPropertyKey?: string;
481
-
/**v.1.7.7+ A unique partition key value of a logical partition for non-relational custom entity data stored in NoSql tables of Azure heterogenous storage. */
482
+
/**A unique partition key value of a logical partition for non-relational custom entity data stored in NoSql tables of Azure heterogenous storage. */
/**v.1.7.5+ If set to true, the request bypasses custom business logic, all synchronous plug-ins and real-time workflows are disabled. Check for special exceptions in Microsft Docs. */
512
+
/**If set to true, the request bypasses custom business logic, all synchronous plug-ins and real-time workflows are disabled. Check for special exceptions in Microsft Docs. */
512
513
bypassCustomPluginExecution?: boolean;
513
514
/**Sets If-Match header value that enables to use conditional retrieval or optimistic concurrency in applicable requests.*/
/**A String representing the GUID value of the user query. */
540
541
userQuery?: string;
541
-
/**v.1.7.7+ A unique partition key value of a logical partition for non-relational custom entity data stored in NoSql tables of Azure heterogenous storage. */
542
+
/**A unique partition key value of a logical partition for non-relational custom entity data stored in NoSql tables of Azure heterogenous storage. */
/**Sets Prefer header with value 'odata.track-changes' to request that a delta link be returned which can subsequently be used to retrieve entity changes. */
564
565
trackChanges?: boolean;
565
-
/**v.1.7.7+ A unique partition key value of a logical partition for non-relational custom entity data stored in NoSql tables of Azure heterogenous storage. */
566
+
/**A unique partition key value of a logical partition for non-relational custom entity data stored in NoSql tables of Azure heterogenous storage. */
566
567
partitionId?: string;
567
-
/**v.1.7.7+ Additional query parameters that either have not been implemented yet or they are parameter aliases for "$filter" and "$orderBy". Important! These parameters ARE NOT URI encoded! */
568
+
/**Additional query parameters that either have not been implemented yet or they are parameter aliases for "$filter" and "$orderBy". Important! These parameters ARE NOT URI encoded! */
568
569
queryParams?: string[];
569
570
}
570
571
exportinterfaceAssociateRequestextendsRequest{
@@ -824,6 +825,7 @@ export interface ApiConfig {
824
825
path?: string;
825
826
}
826
827
exportinterfaceAccessToken{
828
+
/** Access Token */
827
829
accessToken: string;
828
830
}
829
831
exportinterfaceConfig{
@@ -834,7 +836,7 @@ export interface Config {
834
836
/**Impersonates a user based on their Azure Active Directory (AAD) object id by passing that value along with the header "CallerObjectId". A String should represent a GUID value. */
835
837
impersonateAAD?: string|null;
836
838
/**A function that is called when a security token needs to be refreshed. */
/**Sets Prefer header with value "odata.include-annotations=" and the specified annotation.Annotations provide additional information about lookups, options sets and other complex attribute types.*/
839
841
includeAnnotations?: string|null;
840
842
/**Sets the odata.maxpagesize preference value to request the number of entities returned in the response. */
0 commit comments