My blog has moved!

Please visit
http://crmdude.wordpress.com/
and update your bookmarks.

Friday, 3 April 2009

Setting a lookup value to null

To set a lookup field to null you'd do the following in your c# code:

vehicle.new_accountid = new Lookup();
vehicle.new_accountid.IsNull = true;
vehicle.new_accountid.IsNullSpecified = true;

To do the same using JavaScript, you'd do the following:

crmForm.all.new_accountid.DataValue = null;

No comments:

Post a Comment