我試圖將客戶關係管理4插件轉換爲CRM 2011. 有人知道哪些是CRm 2011中的相應類型?如何將客戶關係管理4類型更改爲客戶關係管理2011
客戶,CrmDateTime,CrmDecimal,CrmFloat,CBoolean,CrmMoney,老闆,領料單,重點,狀態,唯一標識符,CrmBoolean
public static object GetAttributeValue(this Entity target, string attributeLogicalName)
{
object value;
if (target.Attributes.Contains(attributeLogicalName))
{
value = target.Attributes[attributeLogicalName];
if ((value is Boolean) || (value is string))
return value;
else if (value is Customer)
return ((Customer)value).Value;
else if (value is CrmDateTime)
return ((CrmDateTime)value).UserTime;
else if (value is CrmDecimal)
return ((CrmDecimal)value).Value;
else if (value is CrmFloat)
return ((CrmFloat)value).Value;
else if (value is CrmNumber)
return ((CrmNumber)value).Value;
else if (value is CBoolean)
return ((CrmBoolean)value).Value;
else if (value is Lookup)
return ((Lookup)value).Value;
else if (value is CrmMoney)
return ((CrmMoney)value).Value;
else if (value is Owner)
return ((Owner)value).Value;
else if (value is Picklist)
return ((Picklist)value).Value;
else if (value is Key)
return ((Key)value).Value;
else if (value is Status)
return ((Status)value).Value;
else if (value is UniqueIdentifier)
return ((UniqueIdentifier)value).Value;
else if (value is CrmBoolean)
return ((CrmBoolean)value).Value;
return null;
}
else
return null;
}
您是正確的,仍然存在自定義類型,但不能替代標準.NET類型 – ccellar