我已经编写了一个创建后插件,以便在创建关联的案例操作记录时将案例分配给团队。下面是一段代码:
Entity caseActionEntity = context.InputParameters["Target"];
EntityReference team = (EntityReference)caseActionEntity.Attributes["fmc_teamid"];
EntityReference caseEntity = (EntityReference)caseActionEntity.Attributes["regardingobjectid"];
AssignRequest request = new AssignRequest
{
Assignee = new EntityReference("team", team.Id),
Target = new EntityReference("incident",caseEntity.Id),
};
service.Execute(request);
但它给出了例外,因为一项活动应该只有一个所有者方。服务后。执行(请求);执行。谁能告诉我如何将现有的案例记录分配给团队..?