Wednesday, August 02, 2017

Dynamics CRM–Retrieving optionset values from the database

SELECT o.name,
        a.Value,
        l.label
FROM AttributePicklistValueView a
      JOIN OptionSetView o ON o.OptionSetId = a.OptionSetId
      JOIN LocalizedLabelView l ON l.ObjectId = a.AttributePicklistValueId
WHERE o.Name = ‘optionSetName';

No comments:

Post a Comment

Remember, if you want me to respond to your comment, then you need to use a Google/OpenID account to leave the comment.