Friday, August 7, 2009

Function to create CrmCustomer

public static Customer GetCrmCustomer(string entityTypeName, Guid value) {
Customer rslt = new Customer();
if (value == Guid.Empty)
rslt.IsNull = rslt.IsNullSpecified = true;
else {
rslt.type = entityTypeName;
rslt.Value = value;
}
return rslt;
}
Enjoy,
Rami Heleg