trying to capture user from webpage to custom lookup field in CRM. Below is the code
ServiceSA1["service_responseby"] = ((EntityReference)ec2.Entities[0].Attributes["systemuserid"]).Id;
throwing error : System.InvalidCastException: 'Unable to cast object of type 'System.Guid' to type 'Microsoft.Xrm.Sdk.EntityReference'.'






