【问题标题】:create contact bound of account in CRM C#在 CRM C# 中创建帐户的联系人绑定
【发布时间】:2017-07-07 08:17:10
【问题描述】:

我不知道如何创建绑定到帐户的联系人。我有一个包含帐户和联系人的 csv 文件,我想将此数据导入到我的 CRM 中。这是我在 CRM 中添加帐户的代码:

#region Column One Mappings
// Create a column mapping for a 'text' type field. Ajouter un Compte
ColumnMapping colMapping1 = new ColumnMapping()
{
    // Set source properties.
    SourceAttributeName = "my_new_accounts",
    SourceEntityName = "Account_1",

    // Set target properties.
    TargetAttributeName = "name",
    TargetEntityName = Account.EntityLogicalName,

    // Relate this column mapping with the data map.
    ImportMapId = new EntityReference(ImportMap.EntityLogicalName, importMapId),

    // Force this column to be processed.
    ProcessCode = new OptionSetValue((int)ColumnMappingProcessCode.Process)
};

// Create the mapping.
Guid colMappingId1 = _serviceProxy.Create(colMapping1);
#endregion

我想创建多个绑定到一个帐户的联系人。

【问题讨论】:

    标签: c# sdk dynamics-crm crm


    【解决方案1】:

    您使用的示例代码来自CRM SDK,同样的示例也包含用于映射父帐户查找映射的代码。

     // Create a lookup mapping to the parent account.  
            LookUpMapping parentLookupMapping = new LookUpMapping().........
    

    查看此代码块,阅读 cmets,根据需要实现。

    如果您只是在尝试这种方法,请继续。或者您可以简单地使用 OOB 数据导入向导进行导入。

    【讨论】:

      猜你喜欢
      • 2018-06-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多