James_Hayes
Canvas Initiate

Retrieve Salesforce records to assist with payment approval process

Jump to solution

Hi, 

 

I'm very new here so apologies if this has been answered somewhere else already but I couldn't find anything while searching. 

I'm trying to create a payment approval form so our dealer network can request and receive approval to work quickly and easily. 

 

To do this, I've created a form that asked the dealer for the case number of the job they're working on. What I want to then do is retrieve the details of that case from Salesforce, including other relevant customer information, to then pass to the approving managers for approval. the Salesforce info will mean the managers do not have to manually look up all the info they need to make their decision as it will all be present for them in the approval request email they receive. 

 

That's the concept anyway. 

 

So far I've created the form and have been able to successfully query salesforce with the job number and get a result (I think, it says it worked but I can't see a record or anything to confirm).

 

What do I do next? How do i actually retrieve the case details once I've successfully queried salesforce?

 

I've tried taking the output of the query records and using it as an input for a salesforce "retrieve a record" action but I get an error in that step. Not sure what I'm doing wrong here. Any help would be appreciated. 

 

Kind Regards,

 

Workflow testing screenshots:

James_Hayes_0-1618556974819.png

If I include the "retrieve a record" action

James_Hayes_1-1618557105543.png

 

James_Hayes_3-1618557169357.png

 

 

James_Hayes_2-1618557158189.png

 

James_Hayes_4-1618557194278.png

 

0 Kudos
Reply
2 Replies
leighburke
Nintex Employee
Nintex Employee

Re: Retrieve Salesforce records to assist with payment approval process

Jump to solution

@James_Hayes  When you query you are potentially getting more than one result, so you either need to record ID out of the collection(https://help.nintex.com/en-US/nwc/Content/Designer/Actions/Collection-GetItem.htm) keep in mind collections always start from 0 so if there is only one record that's the index. Alternatively loop through the collection to get the results for multiple records(https://help.nintex.com/en-US/nwc/Content/Designer/Actions/LoopforEach.htm).

View solution in original post

Reply
James_Hayes
Canvas Initiate

Re: Retrieve Salesforce records to assist with payment approval process

Jump to solution

Thanks Leigh, 

 

Yes this was the issue, I didn't realise it was returning an array. Makes perfect sense in hindsight. I added a "Get Item from Collection" step once I realised this was the problem and retrieved the record ID I required. 

 

Thanks for your reply, much appreciated.

 

Kind Regards,

 

0 Kudos
Reply