{Quick Tip} When you need option set text value inside your plugin in Dynamics CRM

Normally when a developer in CRM goes to check Option set value only finds out that the Option Set is stored

as an integer and to get the string value normally people use methods like this one:

Look at the approach at this link:


Doing a metadata call for this.

Metadata calls are more time consuming than value already available in memory.


Well CRM does provide a direct way if you have the entity already retrieved, which most oldies in CRM know:

string optionSetText = entity.FormattedValues[“optionsetname”];

Hope it helps and Happy CRMing!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s