Reputation: 263
How to get option set value of an entity from sql server. I have developed a windows application , in which i was getting option set from crm using impersonization. But now my requirement is to get the value from sql server using sql server credentials but not with crm credentials.
Upvotes: 6
Views: 5988
Reputation: 617
select
e.Name as EntityName,
e.ObjectTypeCode,
s.AttributeName,
s.AttributeValue,
s.Value,
s.DisplayOrder
from
StringMap s
inner join EntityLogicalView e on
s.ObjectTypeCode = e.ObjectTypeCode
where
e.Name = 'new_entityname'
and s.AttributeName = 'new_optionsetname'
Upvotes: 11
Reputation: 6715
Direct SQL access is obviously unsupported but if you need to grab the info anyway, you need to look at the StringMap
view. You can then filter by entity and attribute name as required.
Upvotes: 3