Showing results for 
Search instead for 
Did you mean: 
New Member

How do I know if a entity property is using an OptionSet

When I view the property in the metadata, I see the primitive type, Edm.Int32.  How do I know if a property is using an option set?


An example property is territorycode for the account entity.


I am working on Dynamics

Super User
Super User

Hi @nilanjenator,

From looking straight at the Web API metadata you can't unfortunately because optionsets are saved as integers in the database. The data model would need to be known to consumers. We usually document the entity/data model well and give privileges to consumers to look at the metadata in CDS.


this is one reason to use naming conventions. 


end lookup fields with ID

End optionsets with code

start two option field schema names with "is"


generally system fields that end in code are option sets


Here's a tip--install this chrome extension:

this lets you easily browse the metadata of your environment and see the field definitions.

Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,486)