【发布时间】:2016-01-14 05:05:00
【问题描述】:
我在案例实体中有 BPF(基于默认的“电话到案例流程”)。 当我通过 C# 代码解决或取消案例时 - BPF 从特定案例表单中消失,这会导致表单中的 JS 错误。 当我从 CRM 解决或取消案例时 - BPF 正常显示。
我的解决案例代码:
Entity incidentResolution = new Entity("incidentresolution");
incidentResolution.Attributes["incidentid"] = new EntityReference("incident", caseID);
if (!string.IsNullOrEmpty(resolution))
{
incidentResolution.Attributes["subject"] = resolution;
}
if (!string.IsNullOrEmpty(description))
{
incidentResolution.Attributes["description"] = description;
}
CloseIncidentRequest closeIncidentRequest = new CloseIncidentRequest
{
IncidentResolution = incidentResolution,
Status = new OptionSetValue(1000)
};
crmService.Execute(closeIncidentRequest);
这是我的取消案例代码:
SetStateRequest setState = new SetStateRequest();
setState.EntityMoniker = new EntityReference();
setState.EntityMoniker.Id = caseID;
setState.EntityMoniker.LogicalName = "incident";
setState.State = new OptionSetValue(2);
setState.Status = new OptionSetValue(2000);
crmService.Execute(setState);
我可以为在这种情况下显示的 BPF 做些什么吗?
【问题讨论】:
标签: c# dynamics-crm-2015