cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CraigD
Level: Powered On

Retrieving "@odata.nextLink" from Salesforce "Get Records" Action

I am looking to use the Get Records action from Salesforce to pull down a list of records matching a given set of criteria. If the number of records exceeds the default maximum batch size, then additional records can be returned using the a URL which is returned in actionBody('xxxxxxxxx')['@odata.nextLink'].

 

The flow i have created (in pseduocode) is below. 

 

trigger - Manually trigger a flow

action - Salesforce:Get Records

action - Variables: Initalize Variable - nextLink (string) = actionBody('Get_Records')['@odata.nextLink']

action - SQL Server: Execute Stored Procedure (details not important)

do

      action - ?? get next result set ??

      action - Variables - Set Variable: nextLink (string) = actionBody('Get_Records')['@odata.nextLink']

until 

 

I have tried to use a HTTP GET action using the url provided above, but it fails with "Authentication Error". Perhaps this question is better asked: how do I use the same session that was used for the salesforce connector to retrieve the next result set using HTTP GET?  From my understanding of salesforce REST API, there woudl be a session id generated but it does not seem to be accessible as part of the salesforce Get Records action, or via the connector.

  

Cheers.

Craig

2 REPLIES 2
Community Support Team
Community Support Team

Re: Retrieving "@odata.nextLink" from Salesforce "Get Records" Action

Hi @CraigD,

 

It seems that you are trying to use HTTP action in your flow, more details about HTTP action, please check this blog for a reference:
https://flow.microsoft.com/en-us/blog/http-card-tutorial/

 

Are you trying to get output parameters from the action “Execute Stored Procedure”? If yes, there is a current limitation that when invoking a Stored Procedure on on-premises SQL server, output values for OUTPUT parameters are not returned. You can still specify input values for OUTPUT parameters. Please see this doc for more details about known limitations on SQL server:
https://docs.microsoft.com/en-us/connectors/sql/


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
CraigD
Level: Powered On

Re: Retrieving "@odata.nextLink" from Salesforce "Get Records" Action

Apologies if this was unclear. I am trying to fetch the next result set from a salesforce "Get Records" and have not been able to find a way do this. 

 

The value of "nextLink" is a URL, however merely executing a HTTP GET of the URL fails, so presumably there is a context in which this needs to be executed (ie some additional headers) to get this to work.

 

Thanks again for your response. I have updated the originla question to provide additional details.

Craig

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,926)