O'Reilly logo

Microsoft Dynamics CRM 2011 Application Design by Mahender Pal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Late bound classes

In the late bound programming method, we use the Entity class to refer to OOB and custom entities. Using late bound classes, we can refer to entities and attributes that may not exist during compile time. The late bound class method performs type checking at runtime. While using a late bound class, we will not get any type of intelliSense support, so we need to make sure to reference the correct field entity and attribute names. In the late bound method we use logical attribute names instead of schema names. The following code snippet is an example of creating a contact using a late bound class:

Entity _Contact=new Entity("contact"); _Contact["firstname"]="Mahender"; _Contact["lastname"]="Pal"; Guid _ContactId=_service.Create(_Contact); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required