Good day,
Kindly assist,I am writing a plugin that triggers on update of an entity.
This then check a specific attribute on an entity if this attribute is true
It then assigns to the relevant person.
My problem is that it is not assigning at all,but my assign method I have debugged through it it contains all the values and the values are not nulls ,what could be the cause of not to assign ? see code below and assist
try
{
// Create the Request Object and Set the Request Object's Properties
AssignRequest assign = new AssignRequest
{
//User to whome you are assigning the entity to
Assignee = new EntityReference("systemuser", OwningUserID),
////Current record which you are assigning to the user
Target = new EntityReference(TargetEntity.LogicalName, TargetRecordID)
};
// Execute the Request
orgService.Execute(assign);
}
catch (Exception ex)
{
throw new InvalidPluginExecutionException("An error occured while assinging Tier3 User to a DHA Case." +
ex.Message);
}
the following contains information and are not nulls TargetEntity.LogicalName, TargetRecordID,OwningUserID but no assignment is happening.
Help ins this regard will be much appreciated.
Thanks