我有Dynamics CRM 2011插件(检索,后操作),在检索Contact实体时应该简单地设置自定义字段的值:
public void Execute(IServiceProvider serviceProvider)
{
IPluginExecutionContext context = PluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
if (context.OutputParameters != null)
{
Entity entity = (Entity)context.OutputParameters["BusinessEntity"];
if (entity.Attributes.ContainsKey("new_markerexists") == false)
return;
entity["new_markerexists"] = "Marker exists.";
但是,CRM插件找不到此字段或任何其他自定义字段。它可以在标准字段中正常工作。
我在这里想念什么?
谢谢!
如此处所述:https : //stackoverflow.com/a/9903306/1023562
在CRM中,仅包含已设置或更新的属性。
我的自定义字段没有设置任何值,因此CRM根本没有将它们包括在entity.Attributes集合中。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句