Skip to content


How to get value of lookup field in CRM Map?

Tudor asked 9 years ago
I’m trying to sync Billing End Dates from GP to CRM and place them as the Contract End Date for the Contract entity. One issue I am running into is that the CRM Contract requires a value for Contract Template field which is a lookup filed in CRM. In my map, I’m not sure how to populate the value of this field, basically it would be one template for all contracts synched. Any ideas how to get the value for the lookup? Thanks!
Tudor replied 9 years ago

After looking into this a bit more I see that the best way to do this would be using an Entity Lookup to map something to the Contract Template field, however, is there any way to assign one value (hard code) to this lookup rather than map something from GP?

Best Answer
Chris answered 9 years ago
The columns you would need to use would either be the entity lookup, which you found, or the entity reference.

An entity reference is used if you already have the GUID for the lookup in your source data and you just want to pass it through. An entity lookup lets you compare one or more fields from your source data against an entity in CRM to get the correct GUID for the lookup value you want. 

If you want to set it just to one value you can create another column in your source data (doesn't actually have to be part of the source file, can be something you create in the source query) that is set just to one value. Ie: SELECT *, 'myValue' As NewField FROM MyTable.

Then in your entity lookup you can compare that field to whatever field you need in the entity lookup to always pull back the same value.

Tudor replied 9 years ago

Thanks for the help!

The second option you mention (using the SELECT query) would I create that column in the map? I know I tried to create a MSSQL Lookup but that again asked me for a condition where I would need to match with GP.

I just wanted it so when it asks for Support Contract Template I could simply enter the GUID or name of the template and use that for every single contract its creating.

Thanks for the clarification!

If you would like to submit an answer or comment, please sign in to the eOne portal.