如何将Sitecore WFFM表单查找字段中的值插入CRM Dynamics中的查找字段?我可以从WFFM获得Guid形式的值,但它没有插入到CRM动态中。为什么??
public void Execute(ID formid, AdaptedResultList fields, params object[] data)
{
string email = fields.GetValueByFieldID(Email); //this works and insert into CRM
string CountryName = fields.GetValueByFieldID(Country); // this does not work and value is not inserted into the CRM. This one is picking up value in GUID form.
}发布于 2017-05-04 01:23:41
对于Dynamics CRM: Lookupfield为EntityReferences。因此,您必须使用实体的LogicalName和Id (Guid)设置一个EntityReference。
示例:
Entity entity = new Entity("country");
entity["lookupFieldAttributeName"] = new EntityReference("[PointingToEntityLogicalName]",[PointingToEntity_EntityId(GUID)]);此外,在SO上也有很多帖子。
示例:
https://stackoverflow.com/questions/43764460
复制相似问题