How to select a OptionSet on ms sqlserver database for Microsoft Dynamics CRM

OptionSet:

Select * from StringMap

Global OptionSet:

select  os.Name, l.Label from AttributePicklistValueAsIfPublishedLogicalView av

join OptionSetAsIfPublishedLogicalView   os

on av.OptionSetId = os.optionsetid

join LocalizedLabelAsIfPublishedLogicalView   l

on l.ObjectId = av.AttributePicklistValueId

where os.IsGlobal = 1 and os.IsCustomOptionSet =   1

and os.Name = 'new_xxx'

 

原文地址:https://www.cnblogs.com/haoliansheng/p/4143318.html