Forum Discussion
A Mapper Snap before the Salesforce Update Snap can be used to specify ID.
See the example in the documentation: https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438491/Salesforce+Update
- GBekkanti8 years agoNew Contributor III
Hi dmiller,
for example, I want to update the table in which 3 columns are there; empNo, Salary, Department.
now, I want to increase the salary for particular department. My question is where we are configuring that Department is condition and Salary is the updating column. In mapper we just map two columns Salary and Department.
- brianrandolph8 years agoNew Contributor III
I’m having a similar problem with a custom object. I believe it has to do with permissions and if the columns are accessible and updateable to your user. I am currently working with my Salesforce administrator prior to raising a support ticket.
- GBekkanti8 years agoNew Contributor III
Hi @brianrandolph , I could not get in what way it is related to my question.
- del8 years agoContributor III
@GBekkanti, to use the Salesforce Update snap, you must have the Salesforce record “Id” present in the document. So your upstream snaps will need to capture the Id from Salesforce for the particular record(s) you want to update and pass the Id through to where you can include it in the Mapper before the update snap.
Here’s a simplistic example to increase all the Sales department by $5. Notice, only Id and Salary__c are required in the Mapper. Department__c is not required in the Mapper. (I did include it in the Read snap Output fields, but it wasn’t necessary unless you want to use a downstream Filter snap instead of the Read snap’s Where clause.)
Salesforce Read
Mapper
Disclaimer: I mocked this up without testing, so please excuse any typos.