Retrieving CRM Option Set values from SQL #tips #crm #sql #optionsets

Today I needed to get a list of all the options sets for a particular option set. One option would be to do a DISTINCT query on the filtered view but that might not return me all of the values as some might not be used.

I did a quick search and found out that the option set values are stored in the FilteredStringMap view, here is the query:


SELECT AttributeValue,
Value
FROM FilteredStringMap
WHERE FilteredViewName = 'Filteredentity_name'
AND AttributeName = 'option_set_name'
ORDER BY DisplayOrder

Advertisements

One thought on “Retrieving CRM Option Set values from SQL #tips #crm #sql #optionsets

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s