Working with lookups

Working with lookups presents a new set of challenges. In a lookup we are basically pointing to existing values populated in another entity. We are looking for the ID of the target selected entity.


Be aware that once values are loaded into an environment, ID's are automatically associated. If you move your solution to another environment and reload the source entity data, new ID's are being generated, and you will have to update your script as such.

Getting ready

For the purpose of this recipe we will be using the existing solution we have already created. If you have not created a solution already, now is a good time to do so.

Add to your solution the Contact entity. We've been focusing on making changes to this entity, and ...

Get Microsoft Dynamics CRM 2011 Scripting Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.