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 II
Super User II

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

PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,981)