Entity contact = Service.Retrieve("contact", new Guid("3177741D-27BA-DE11-AC0C-0018717A8C82"), new ColumnSet(true));
if (contact.Contains("parentcustomerid"))
{
if (contact["parentcustomerid"] != null)
{
var check = contact["parentcustomerid"];
throw new InvalidPluginExecutionException(check.ToString());
}
else
{
throw new InvalidPluginExecutionException("is null");
}
}
else
{
throw new InvalidPluginExecutionException("parentcustomerid not set");
}