开发者

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

I'm doing a data migration in to Microsoft Dynamics CRM 2011 and need to perform reconciliations against the source to ensure that everything loaded successfully.

To do this I am querying th开发者_JAVA技巧e SQL directly in SQL Server, but I can't seem to find where the OptionSet data is stored. Does anyone know what table(s) it's stored in?


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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜