Skip to main content

Power BI

Needs Votes

Update SalesForce Report Connection SOQL to use the "nextRecordsUrl" variable to retrieve all rows in a report.

Vote (2) Share
Joseph Dodd's profile image

Joseph Dodd on 14 Apr 2021 22:06:19

The Known Issues and Limitations portion of the Power Query Sales Force Report Microsoft Documentation (https://docs.microsoft.com/en-us/power-query/connectors/salesforcereports) states that "The number of rows you can access in Salesforce Reports is limited by Salesforce to 2000 rows."

However, SalesForce REST API documentation (https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm) states that "If the initial query returns only part of the results, the end of the response will contain a field called nextRecordsUrl... In such cases, request the next batch of records and repeat until all records have been retrieved. These requests use nextRecordsUrl, and do not include any parameters."

Usage of this feature defined in the SFDC REST API documentation will allow for full SalesForce Reports to be used as data sources in Power BI, and not just the initial 2000 rows.

Comments (2)
Joseph Dodd's profile image Profile Picture

Balakrishna Sappa on 23 Sep 2022 11:53:16

RE: Update SalesForce Report Connection SOQL to use the "nextRecordsUrl" variable to retrieve all rows in a report.

here is the same idea duplicated:Microsoft Idea (powerbi.com)

Joseph Dodd's profile image Profile Picture

Balakrishna Sappa on 23 Sep 2022 11:51:04

RE: Update SalesForce Report Connection SOQL to use the "nextRecordsUrl" variable to retrieve all rows in a report.

yes it's a limitation of Power Query Salesforce Reports connector. similar kind of a connector is available in Google sheets as an add-on that addresses this problem.Many product api's come with this kind of limiation of allowing to read not more than x number of records in a single api call. It's upto the connector (like Salesforce report connector in Power Query or Salesforce data connector in Google Sheets) to do the recusive calls to the api until the last record is read through the api.Google addressed it in its Salesforce data connector of Google sheets. Microsoft hasn't addressed it yet in Power Query. Moreover, it's not a huge development effort for that enhancement of reading full report data. It is just about turning that api call into a recursive on until all records of the report are read.Does Microsoft really need votes for it? Prioritization doesn't necessarily had to be through votes all the time. Folks are posting solutions to extract full report data using google sheets and then consuming it into the power query from google drive using web api like here:Solved: How to Bypass Salesforce 2000 Rows Limitation - Microsoft Power BI CommunityThese are the loops that are driving people to see the alternate vendor solutions.same idea posted as another one here too: Microsoft Idea (powerbi.com)