cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

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
Highlighted
Community Support
Community Support

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.
Highlighted
Regular Visitor

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
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (1,977)