Solved

Can I use an insert/update to add 1 to a salesforce field?

  • 19 June 2017
  • 1 reply
  • 9 views

I know I can set a value in Salesforce when a DDP is generated.  In my use case, I want to update a version number each time a DDP is run -- so it will start with "1" and increase by 1 each time the DDP is run.  Can this be done?  

icon

Best answer by haleywalsh 28 June 2017, 21:44

View original

1 reply

Badge +3

I've accomplished this by used excel-as-middleware. I created a custom field on my object, Opportunity, to hold the version number. I then setup my DDP to use excel-as-middleware and an Insert-Update. The excel-as-middleware file is tagged to populate the current version number field from my Opportunity record and also contains an equation in the cell below to +1 to that number. I then tagged that cell with the calculated value and used it in the Insert-Update to update my record with the new version number.

Reply