Skip to content


Capture the record ID from CRM entity after insert for each document

Software asked 7 years ago
When I’m inserting new records into an entity in CRM, how do I capture the GUID that’s created for each record/document into a variable that I can use to perform additional tasks through SQL script?
Chris Hanson Staff answered 7 years ago
When you import to CRM the map will be generating the GUID on the fly, you can access that GUID by creating an Entity Lookup to lookup the record you just created. Normally you would use that to get the GUID for the record you just created if you have another entity mapped or are mapping to an advanced task that you need the Id for. You can also use Entity Lookups to get the GUID from any other entity you need during an import.
If you need the GUID for use in your own SQL script or another task outside of the mapping options in the SmartConnect map, you would have to set it up in a separate map. I would setup up a change-based data source or a real-time data source on the entity you are importing to. Select the needed insert/update options for watching the source, and then setup that map to run the extra tasks – as the GUID will then be part of your data source and be easily accessed.

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