Entity attribute metadata messages

An entity attribute is a container for a piece of data in an entity. In this developer guide, the term “attribute” and “property” (class property) are often used interchangeably with the term “entity attribute.” The Dynamics 365 Customer Engagement (on-premises) application uses the term “field” when it refers to entity attributes.

Note

It is possible to create and update entity attributes using the Web API. See Create attributes using Web API for more details.

Entity attribute messages

The following table lists the messages that you can use to perform actions on entity attributes.

Message Web API Operation SDK Assembly
CreateAttribute

Create entity attributes
POST to EntityMetadata Attributes collection-valued navigation property with JSON definition of attribute. More information: Create attributes CreateAttributeRequest
DeleteAttribute

Delete entity attributes
DELETE to the URL of the attribute. DeleteAttributeRequest
DeleteOptionValue

Delete an option from PicklistAttributeMetadata or StatusAttributeMetadata attributes
DeleteOptionValue Action DeleteOptionValueRequest
InsertOptionValue

Add an option to a PicklistAttributeMetadata attribute
InsertOptionValue Action InsertOptionValueRequest
InsertStatusValue

Add an option to a StatusAttributeMetadata attribute
InsertStatusValue Action InsertStatusValueRequest
RetrieveAttribute

Retrieve entity attributes
Use the Web API query mentioned in Querying EntityMetadata attributes to retrieve entity attributes. RetrieveAttributeRequest
UpdateAttribute

Update entity attributes
See Update entities UpdateAttributeRequest
UpdateStateValue

Update a label for a StateAttributeMetadata attribute
UpdateStateValue Action UpdateStateValueRequest

See also

Customize Entity Attribute Metadata
Create auto-number attribute
Work with Attributes
Sample: Work with Attributes