Get Option Set String from CRM 2011/2013/2015 in C#


Most of the times, CRM developer in CRM goes to check Option Set value only finds out the value as integer.

At times, we get a requirement to get string value associated with the integer.  For doing this, we write a metadata call and as we all know metadata calls are more time consuming.

As always, CRM is smart just we need to find the correct approach.

When we retrieve the entity, we can always the string of the option set by using the following line.

string strOptionSetText = objEntity.FormattedValues[“”];
Hope this helps.

Happy CRM’ing


Leave a Reply

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

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

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s