web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / HIMBAP / Set entityreference to null...

Set entityreference to null in MS CRM 2011 – Quick Tip

Mahendar Pal Profile Picture Mahendar Pal 45,095

Sometime we need to set lookup field to null through server side code. We can do this using different way in late bound and early bound. If you are looking to set lookup field to null using late bound you can use below code

entity.Attributes.Add(“lookupfieldname”, null);

And if you are looking to set lookup field to null using early bound, you can simply use like below

entity.attributename=null;

Enjoy !!!

 

Comments

*This post is locked for comments