简体   繁体   English

Microsoft Dynamics CRM 在 SQL Server 中的何处存储 OptionSet 值?

[英]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.我正在将数据迁移到 Microsoft Dynamics CRM 2011,需要对源执行对帐以确保所有内容都成功加载。

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.为此,我直接在 SQL Server 中查询 SQL,但似乎找不到 OptionSet 数据的存储位置。 Does anyone know what table(s) it's stored in?有谁知道它存储在哪个表中?

These are all stored in the StringMapBase table.这些都存储在 StringMapBase 表中。 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!使用 FilteredStringMap 继续得到 Microsoft 的“支持”!

Here is an SQL Server function to query the stringmap这是查询字符串映射的 SQL Server 函数

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM