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

你离开我真会死。 提交于 2019-12-04 16:31:18

问题


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 the 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?


回答1:


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.




回答2:


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




回答3:


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


来源:https://stackoverflow.com/questions/7329147/where-does-microsoft-dynamics-crm-store-optionset-values-in-sql-server

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