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.

Tip

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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.