Where does Microsoft Dynamics CRM store OptionSet values in SQL Server?

穿精又带淫゛_ 提交于 2019-12-03 09:39:59

These are all stored in the StringMapBase table. You'll query via object type code of the entity, attribute name, option set value and language and that'll give you the display value of the attribute.

Just a reminder! Use FilteredStringMap to continue to be 'supported' by Microsoft!

Here is an SQL Server function to query the stringmap

CREATE FUNCTION fn_new_GetStringMapValue 
(
    @AttributeName nvarchar(100),
    @AttributeValue int
)
RETURNS nvarchar(4000)
AS
BEGIN
    DECLARE @Result nvarchar(4000)
    SELECT @Result = Value
    FROM dbo.FilteredStringMap
    WHERE AttributeName = @AttributeName AND AttributeValue = @AttributeValue

    RETURN @Result
END
GO
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!