I'm have written a Post-create plug-in to assign a case to team when associated case action record has created. Below is the piece of code:
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);
But its giving exception as There should be only one owner party for an activity. after service.Execute(request); executed. Can any one tell me how to assign existing case record to team..?