Tuesday, June 26, 2012

Making an EntityReference in a CRM 2011 to Null Programmatically

First of all, is this needed? Yes, we need to do this when working with c# code sometimes where we want to clear a look up field value. 

How can we do this?

It’s very easy. All we have to do is assign null value to the field. That would do the trick.
contact.parentcustomerid = null;

the above statement will clear out the parent customer value in a contact.

No comments:

Post a Comment

Retrieving Calendar of a Bookable Resource in Dynamics

There are occasions where we need to retrieve working days and working times of a resource in Dynamics grammatically. This is quite possible...