Skip to content

Commit d92404e

Browse files
authored
Merge branch 'live' into patch-6
2 parents 3892036 + 46f6a20 commit d92404e

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

+565
-280
lines changed

powerapps-docs/developer/common-data-service/create-auto-number-attributes.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: "Create auto-number attributes (Microsoft Dataverse) | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
3-
description: "Learn about creating auto-number attribute in the same way you create a string attribute using the StringAttributeMetadata class except that you use the new AutoNumberFormat property. Use the AutoNumberFormat property to define a pattern that includes sequential numbers and random strings by composing placeholders, which indicates the length and type of values that are generated."
4-
keywords: "Auto-number attributes" # 115-145 characters including spaces. This abstract displays in the search result.
2+
title: "Create autonumber attributes (Microsoft Dataverse) | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
3+
description: "Learn about creating autonumber attribute in the same way you create a string attribute using the StringAttributeMetadata class except that you use the new AutoNumberFormat property. Use the AutoNumberFormat property to define a pattern that includes sequential numbers and random strings by composing placeholders, which indicates the length and type of values that are generated."
4+
keywords: "Autonumber attributes" # 115-145 characters including spaces. This abstract displays in the search result.
55
ms.custom: ""
66
ms.date: 07/24/2019
77
ms.reviewer: "pehecke"
@@ -16,28 +16,28 @@ search.app:
1616
- PowerApps
1717
- D365CE
1818
---
19-
# Create auto-number attributes
19+
# Create autonumber attributes
2020

2121
[!INCLUDE[cc-data-platform-banner](../../includes/cc-data-platform-banner.md)]
2222

23-
With Microsoft Dataverse, you can add an auto-number attribute for any entity. Currently, you can add the attribute programmatically. There is no user interface to add this type of attribute. The topic explains how you can programmatically create an auto-number attribute and set a seed value for sequential elements. In addition, the topic shows how to set the sequence number for the next record if you need to reset the seed at any time later.
23+
With Microsoft Dataverse, you can add an autonumber attribute for any entity. Currently, you can add the attribute programmatically. The topic explains how you can programmatically create an autonumber attribute and set a seed value for sequential elements. In addition, the topic shows how to set the sequence number for the next record if you need to reset the seed at any time later.
2424
> [!NOTE]
2525
>The setting of the seed is optional. There is no need to call the seed if you don’t need to reseed.
2626
2727

28-
You can create an auto-number attribute in the same way you create a string attribute using the **StringAttributeMetadata** class except that you use the new **AutoNumberFormat** property. Use the **AutoNumberFormat** property to define a pattern that includes sequential numbers and random strings by composing placeholders, which indicates the length and type of values that are generated. The random strings help you to avoid duplicates or collisions, especially when offline clients trying to create auto-numbers.
28+
You can create an autonumber attribute in the same way you create a string attribute using the **StringAttributeMetadata** class except that you use the new **AutoNumberFormat** property. Use the **AutoNumberFormat** property to define a pattern that includes sequential numbers and random strings by composing placeholders, which indicates the length and type of values that are generated. The random strings help you to avoid duplicates or collisions, especially when offline clients trying to create autonumbers.
2929

30-
When creating an auto-number attribute, the **StringAttributeMetadata.FormatName** property or the **StringAttributeMetadata.Format** property values must be Text. Since these are the default values you will typically not set this property. You cannot create an auto-number attribute that uses any other special kind of format such as Email, Phone, TextArea, Url or any other [existing formats](https://msdn.microsoft.com/library/microsoft.xrm.sdk.metadata.stringformatname.aspx).
30+
When creating an autonumber attribute, the **StringAttributeMetadata.FormatName** property or the **StringAttributeMetadata.Format** property values must be Text. Since these are the default values you will typically not set this property. You cannot create an autonumber attribute that uses any other special kind of format such as Email, Phone, TextArea, Url or any other [existing formats](https://msdn.microsoft.com/library/microsoft.xrm.sdk.metadata.stringformatname.aspx).
3131

3232
The sequential segment is generated by SQL and hence uniqueness is guaranteed by SQL.
3333

3434
> [!NOTE]
35-
>You can modify an existing format text attribute to be an auto-number format.
35+
>You can modify an existing format text attribute to be an autonumber format.
3636
37-
In the legacy web client, when adding a control on a form bound to an auto-number attribute, the control is disabled automatically and behaves as read-only in the form where end-users cannot edit the control. In the Unified Interface, controls bound to an auto-number attribute need to explicitly be set as disabled. If you do not set the initial attribute value on the form, the value is set only after you save the entity. Auto-numbering can be applied to attribute field values in views, grids and so on.
37+
In the legacy web client, when adding a control on a form bound to an autonumber attribute, the control is disabled automatically and behaves as read-only in the form where end-users cannot edit the control. In the Unified Interface, controls bound to an autonumber attribute need to explicitly be set as disabled. If you do not set the initial attribute value on the form, the value is set only after you save the entity. Autonumbering can be applied to attribute field values in views, grids and so on.
3838

3939
### Examples
40-
The following examples show how to create a new auto-number attribute named **new\_SerialNumber** for a custom entity named **new\_Widget** which will have a value that looks like this: **WID-00001-AB7LSFG-20170913070240**.
40+
The following examples show how to create a new autonumber attribute named **new\_SerialNumber** for a custom entity named **new\_Widget** which will have a value that looks like this: **WID-00001-AB7LSFG-20170913070240**.
4141
Using the Organization service with SDK assemblies **CreateAttributeRequest** and **StringAttributeMetadata** classes:
4242

4343
```csharp
@@ -155,28 +155,28 @@ The table shows the string length value for the random and sequential placeholde
155155
<tr>
156156
<td><code>{RANDSTRING:MIN_LENGTH}</code></td>
157157
<td>The value of <b>MIN_LENGTH</b> is between 1 and 6.</td>
158-
<td>When you save the entity, the auto-number attribute generates the random string with the defined length if the value is between 1 and 6. If you use the <b>MIN_LENGTH</b> value as 7 or beyond 7, you get to see an Invalid Argument error.</td>
158+
<td>When you save the entity, the autonumber attribute generates the random string with the defined length if the value is between 1 and 6. If you use the <b>MIN_LENGTH</b> value as 7 or beyond 7, you get to see an Invalid Argument error.</td>
159159
</tr>
160160
<tr>
161161
<td><code>{SEQNUM:MIN_LENGTH}</code></td>
162162
<td>The minimum value of the <b>MIN_LENGTH</b> is 1. The number continues to increment beyond the minimum length.</td>
163-
<td>When you save the entity, the auto-number attribute works fine and continue to work fine for larger values of <b>MIN_LENGTH</b>.</td></table>
163+
<td>When you save the entity, the autonumber attribute works fine and continue to work fine for larger values of <b>MIN_LENGTH</b>.</td></table>
164164

165-
For sequential value placeholders, the **MIN_LENGTH** is a minimum length. If you set the value to be 2, the initial value will be 01, and the 100th entity value will be 100. The number will continue to increment beyond the minimum length. The value in setting the length for sequential values is to establish a consistent length for the auto-generated value by adding additional 0s to the initial value. It will not limit the absolute value. Random value placeholders will always be the same length.
165+
For sequential value placeholders, the **MIN_LENGTH** is a minimum length. If you set the value to be 2, the initial value will be 01, and the 100th entity value will be 100. The number will continue to increment beyond the minimum length. The value in setting the length for sequential values is to establish a consistent length for the autogenerated value by adding additional 0s to the initial value. It will not limit the absolute value. Random value placeholders will always be the same length.
166166

167167
Because the sequential values can get larger than the minimum length allotted for them, you should not adjust the **StringAttributeMetadata.MaxLength** property to match the length of your formatted value. There is little value in doing this and it could cause an error in the future if the value exceeds the **MaxLength** value. Make sure you leave enough room for a realistic range of sequential values.
168168

169169
> [!NOTE]
170170
> There is no validation of the placeholder values when you create the attribute. The error appears only when you try to save an entity instance that uses an incorrectly configured **AutoNumberFormat** value.
171-
> For example, if you specify the length of the random string more than 6, the first person creating a new entity instance gets an **Invalid Argument** error when they first try to save the entity containing the new auto-number attribute.
171+
> For example, if you specify the length of the random string more than 6, the first person creating a new entity instance gets an **Invalid Argument** error when they first try to save the entity containing the new autonumber attribute.
172172
173-
## Update auto-number attributes
173+
## Update autonumber attributes
174174

175-
If you create an auto-number attribute with an incorrect configuration or you want to modify an existing auto-number attribute, you can update the attribute the **AutoNumberFormat** value.
175+
If you create an autonumber attribute with an incorrect configuration or you want to modify an existing autonumber attribute, you can update the attribute the **AutoNumberFormat** value.
176176

177-
The following code snippet explains you to retrieve, modify, and update the auto-number attribute.
177+
The following code snippet explains you to retrieve, modify, and update the autonumber attribute.
178178

179-
To modify an existing auto-number attribute, you must retrieve the attribute using the **RetrieveAttributeRequest** class.
179+
To modify an existing autonumber attribute, you must retrieve the attribute using the **RetrieveAttributeRequest** class.
180180

181181
```csharp
182182
// Create the retrieve request
@@ -190,14 +190,14 @@ RetrieveAttributeRequest attributeRequest = new RetrieveAttributeRequest
190190
RetrieveAttributeResponse attributeResponse = (RetrieveAttributeResponse)_serviceProxy.Execute(attributeRequest);
191191
```
192192

193-
After retrieving the auto-number attribute, you need to modify and update the attribute.
193+
After retrieving the autonumber attribute, you need to modify and update the attribute.
194194

195195
```csharp
196-
//Modify the retrieved auto-number attribute
196+
//Modify the retrieved autonumber attribute
197197
AttributeMetadata retrievedAttributeMetadata = attributeResponse.AttributeMetadata;
198198
retrievedAttributeMetadata.AutoNumberFormat = "CAR-{RANDSTRING:5}{SEQNUM:6}"; //Modify the existing attribute by writing the format as per your requirement
199199
200-
// Update the auto-number attribute
200+
// Update the autonumber attribute
201201
UpdateAttributeRequest updateRequest = new UpdateAttributeRequest
202202
{
203203
Attribute = retrievedAttributeMetadata,
@@ -209,10 +209,10 @@ _serviceProxy.Execute(updateRequest);
209209

210210
## Set a seed value
211211

212-
By default, all auto-number sequential values start with 1000 and use 0 as the prefix depending on the length. In this way, the length of the value is always same. If you want to change the initial value, you need to change the initial seed value using the API below to set the next number that are used for the sequential segment.
212+
By default, all autonumber sequential values start with 1000 and use 0 as the prefix depending on the length. In this way, the length of the value is always same. If you want to change the initial value, you need to change the initial seed value using the API below to set the next number that are used for the sequential segment.
213213

214214
For example, when the length of the sequential number is 5, you may want to start with an initial value of 10000 instead of the default value of 00001.
215-
If you want to choose a different starting value after creating the auto-numbering attribute, use the **SetAutoNumberSeed** message. Use the **SetAutoNumberSeedRequest** class when using the SDK assemblies and **SetAutoNumberSeed** action when using the Web API.
215+
If you want to choose a different starting value after creating the autonumbering attribute, use the **SetAutoNumberSeed** message. Use the **SetAutoNumberSeedRequest** class when using the SDK assemblies and **SetAutoNumberSeed** action when using the Web API.
216216

217217
The **AutoNumberSeed** message has the following parameters:
218218

@@ -221,13 +221,13 @@ The **AutoNumberSeed** message has the following parameters:
221221
|:----------|:----------|:----------|
222222
|EntityName|string|The logical name of the entity that contains the attribute you want to set the seed on.|
223223
|AttributeName|string|The logical name of the attribute you want to set the seed on.|
224-
|Value|int|Next auto-number value for the attribute.|
224+
|Value|int|Next autonumber value for the attribute.|
225225

226226
> [!NOTE]
227227
> Setting the seed only changes the **current number value** for the specified attribute in the current environment. It does not imply a common **start value** for the attribute. The seed value is not included in a solution when installed in a different environments. To set the starting number after a solution import, use **SetAutoNumberSeed** message in the target environment.
228228
229229
### Examples
230-
The following samples set the seed to 10000 for an auto-number attribute named **new\_SerialNumber** for a custom entity named **new\_Widget**.
230+
The following samples set the seed to 10000 for an autonumber attribute named **new\_SerialNumber** for a custom entity named **new\_Widget**.
231231

232232
Using the Organization service with SDK assemblies **SetAutoNumberSeedRequest** class:
233233
```csharp
@@ -268,7 +268,7 @@ OData-Version: 4.0
268268

269269
### Auto Number Manager
270270

271-
**[Auto Number Manager](https://www.xrmtoolbox.com/plugins/Rappen.XrmToolBox.AutoNumManager/)** for XrmToolBox is a community driven tool for Dataverse that provides a UI to set, update and remove auto number format on new or existing attributes.
271+
**[Auto Number Manager](https://www.xrmtoolbox.com/plugins/Rappen.XrmToolBox.AutoNumManager/)** for XrmToolBox is a community driven tool for Dataverse that provides a UI to set, update and remove autonumber format on new or existing attributes.
272272
Please see the [Developer tools](developer-tools.md) topic for community developed tools and [anm.xrmtoolbox.com](https://anm.xrmtoolbox.com) for more information about Auto Number Manager.
273273

274274
> [!NOTE]

powerapps-docs/developer/common-data-service/entity-metadata.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,14 @@ ms.tgt_pltfrm: na
1515
ms.workload: na
1616
ms.date: 10/31/2018
1717
ms.author: jdaly
18+
ms.reviewer: phecke
1819
search.audienceType:
1920
- developer
2021
search.app:
2122
- PowerApps
2223
- D365CE
2324
---
24-
<!--
25-
Was Mike Carter
26-
This topic was not migrated it was written for Power Apps
2725

28-
Overlap with content in https://docs.microsoft.com/dynamics365/customer-engagement/developer/introduction-entities
29-
30-
-->
3126
# Entity metadata
3227

3328
[!INCLUDE[cc-data-platform-banner](../../includes/cc-data-platform-banner.md)]
@@ -44,13 +39,12 @@ Each entity has a unique name defined when it is created. This name is presented
4439
|`LogicalName`|All lower-case version of the schema name. i.e. account|
4540
|`LogicalCollectionName`|All lower-case version of the collection schema name. i.e. accounts|
4641
|`EntitySetName`|Used to identify collections with the Web API. By default, it is the same as the logical collection name.<br />It is possible to change the Entity Set name by programmatically updating the metadata. But this should only be done before any Web API code is written for the entity. More information: [Web API types and operations > Change the name of an entity set](/dynamics365/customer-engagement/developer/webapi/web-api-types-operations#change-the-name-of-an-entity-set)|
47-
48-
> [!NOTE]
42+
>[!NOTE]
43+
>`EntitySetName` is automatically generated by changing the `EntityName` to the plural of that name. Example: EntityName: Car EntitySetName: Cars. When manually creating a new entity the `EntitySetName` can be changed. System created `EntitySetName`(s) will always be the plural of the `EntityName` and these cannot be changed through the client interface or APIs. This includes system entities as well as entitles created for many to many relationship intersects.<p/>
4944
> When you create a custom entity, the name you choose will be prepended with the customization prefix value of the solution publisher associated with the solution that the entity was created within. Other than the entity set name, you cannot change the names of an entity after it is created. If you want consistent names for metadata items in your solution, you should create them in the context of a solution you create associated with a solution publisher that contains the customization prefix you want to use. More information : [Solution publisher](/power-platform/alm/solution-concepts-alm#solution-publisher)
5045
5146
Each entity also has three properties that can display localized values:
5247

53-
5448
|Name |Description |
5549
|---------|---------|
5650
|`DisplayName`|Typically, the same as the schema name, but can include spaces. i.e. Account|

powerapps-docs/developer/common-data-service/org-service/entity-operations-query-data.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Query data using the Organization service (Microsoft Dataverse) | Microsoft Docs" # Intent and product brand in a unique string of 43-59 chars including spaces
33
description: "Introduces the different ways to query data using Microsoft Dataverse SDK assemblies." # 115-145 characters including spaces. This abstract displays in the search result.
44
ms.custom: ""
5-
ms.date: 10/31/2018
5+
ms.date: 12/10/2020
66
ms.reviewer: "pehecke"
77
ms.service: powerapps
88
ms.topic: "article"
@@ -41,6 +41,8 @@ Both of these methods will return an <xref:Microsoft.Xrm.Sdk.EntityCollection> t
4141

4242
> [!NOTE]
4343
> To ensure best performance, each query request can return a maximum of 5000 entity records. To return larger result sets you must request additional pages.
44+
>
45+
> All filter conditions for string values are case insensitive.
4446
4547
### Null attribute values are not returned
4648

powerapps-docs/developer/common-data-service/webapi/query-data-web-api.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Query Data using the Web API (Microsoft Dataverse)| Microsoft Docs"
33
description: "Read about the various ways to query Microsoft Dataverse data using the Dataverse Web API and various system query options that can be applied in these queries"
44
ms.custom: ""
5-
ms.date: 12/04/2019
5+
ms.date: 12/10/2020
66
ms.service: powerapps
77
ms.suite: ""
88
ms.tgt_pltfrm: ""
@@ -217,7 +217,9 @@ GET [Organization URI]/api/data/v9.1/accounts?$select=name,revenue
217217
|`( )`|Precedence grouping|`(contains(name,'sample') or contains(name,'test')) and revenue gt 5000`|
218218

219219
> [!NOTE]
220-
> This is a sub-set of the [11.2.5.1.1 Built-in Filter Operations](https://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part1-protocol/odata-v4.0-errata02-os-part1-protocol-complete.html). Arithmetic operators and the comparison has operator are not supported in the Web API.
220+
> This is a sub-set of the [11.2.5.1.1 Built-in Filter Operations](https://docs.oasis-open.org/odata/odata/v4.0/errata02/os/complete/part1-protocol/odata-v4.0-errata02-os-part1-protocol-complete.html). Arithmetic operators and the comparison has operator are not supported in the Web API.
221+
>
222+
> All filter conditions for string values are case insensitive.
221223
222224
<a name="bkmk_buildInQueryFunctions"></a>
223225

0 commit comments

Comments
 (0)