Skip to content


Writing Data Back to Salesforce

Brandon asked 2 years ago
We have a real-time map that pulls account info GP from salesforce after an update or create new. What I would like to do is, once that is done and processed within GP, send a piece of data back to salesforce, updating a field.  Would anyone have any ideas as to the best way to do that?
Ethan Sorenson Staff answered 2 years ago
The best way to write back to SalesForce is to use a post document success task that runs a map. The second map can have any data source you want and a SalesForce destination.
Usually people will save data from the first map in global variables to use in the child map. So you would want to set a global variable to the SalesForceId so you know which record you are updating. Then you can set another one to whichever value you want to update in SalesForce, otherwise you can use global variables to lookup a record in your query of GP.
Here are some helpful links for doing this.
Brandon Aronson replied 2 years ago

Hi Ethan,
Thank you for your response. I had wanted to go down this route but could not figure out how to assign a map column to a global variable. Is that possible? I know how to create a user global variable, but just need to assign it to a column.
Thank you.

Brandon Aronson replied 2 years ago

I was able to figure out how to assign a global variable, using the global variable defaults task option, but I can’t figure out how to take that global variable and assign it to a destination field. I have tried different permutations of using a calculation, but can’t get it to work. Any help would be greatly appreciated.
Thank you again.

Ethan Sorenson Staff replied 2 years ago

On the parent map you will want to use a post document script task similar to this:

GBL_ID = _SourceColumn
return true

After the script task, you will run your map task. Make sure the task is setup to use Global Variables from Parent Map.

Finally you can map that field to your destination with a calculated column

return GBL_ID

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