Skip to main content

Notifications

Power Automate - Using Connectors
Unanswered

Execute a SOQL Query Limitation

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I'm using the "Execute a SOQL Query" action to get records from Salesforce. When I look at the JSON that returns me, it says that has 5729 rows ("body": {"totalSize": 5729 ....}) but if I look at the JSON, it really only has 2000 records. Is there any kind of limitation with this action and any way to solve this? 

 

I know that for the "Get Records" action you can set in Settings --> Pagination to 10000 (for example) to remove the limitation, but I don't see this option available in "Execute a SOQL Query".

 

I'm using the related __r. fieldName so I think I can't use the "Get records" action because I can only specify fields for a single object.

 

Could you help me to get all records (not limited to 2000) from a salesforce query with related fields?

 

Thank you!

  • lbendlin Profile Picture
    lbendlin 7,597 on at
    Re: Execute a SOQL Query Limitation

    same when you try to ingest larger CSV files. It just goes into the crying corner and curls into a ball.

     

    Feel free to raise a support ticket.

  • AlexLindberg Profile Picture
    AlexLindberg 87 on at
    Re: Execute a SOQL Query Limitation

    I am aware of the case sensitivity nature of SFDC's objects.

     

    The larger issue remains.  If the SOQL query is to large, the SOQL widget in Power Automate truncates the result.  I would rather it throw an error.

  • lbendlin Profile Picture
    lbendlin 7,597 on at
    Re: Execute a SOQL Query Limitation

    there are some small issues. Id is case sensitive in SFDC.  You may want to use Case Safe ID instead.

  • AlexLindberg Profile Picture
    AlexLindberg 87 on at
    Re: Execute a SOQL Query Limitation

    Join would be a better verb.   Example:

     

    SOQL 1

    SELECT
     Id ,
     Opportunity__c ,
     User__c ,
     Assigned_To__c ,
     AccountId ,
     CaseNumber ,
     LastModifiedDate ,
     Preferred_Platform__c ,
     Start_Date__c ,
     Completion_Date__c ,
     Kickoff_Meeting_Date__c ,
     Status ,
     ROM_Team_Notes__c 
    FROM
     Case
    WHERE
     ( Record_Type_Name__c = 'My Special Type' )
     

     

    SOQL 2

    SELECT
     Id ,
     Comments__c ,
     Subject ,
     Description ,
     Request_Type_Internal__c ,
     CreatedDate
    FROM
     Case
    WHERE
     ( Record_Type_Name__c = 'My Special Type' )

     

    As you can see, each query has a common Object (Case), Column (Id), and WHERE clause.

     

    Looking for an LEFT or INNER JOIN in DB parlance.  SOQL 1 and SOQL 2 should return the same number of rows.

     

    I want to join the results of both queries into a single array of objects.  Ideally the Join should not have to specify the fields to Join.  Just Join all.

     

  • krzcho Profile Picture
    krzcho 4 on at
    Re: Execute a SOQL Query Limitation

    I am checking the option to download SF report from (azure-hosted) python script 😕

  • lbendlin Profile Picture
    lbendlin 7,597 on at
    Re: Execute a SOQL Query Limitation

    merge or append?

  • lbendlin Profile Picture
    lbendlin 7,597 on at
    Re: Execute a SOQL Query Limitation
    merge or append?
  • lbendlin Profile Picture
    lbendlin 7,597 on at
    Re: Execute a SOQL Query Limitation
    merge or append?
  • AlexLindberg Profile Picture
    AlexLindberg 87 on at
    Re: Execute a SOQL Query Limitation

    The issue still remains.  Something about returning 500k of data breaks something.

     

    I my case I have split the queries into several parts. That then requires the same number of processes to move the results, in my case, into SharePoint lists.  I have to do this because I can't find a way to merge two arrays with many fields and that have a single common key. If I could then the rest of the process would be unchanged.

  • krzcho Profile Picture
    krzcho 4 on at
    Re: Execute a SOQL Query Limitation

    Hi, what was the end result? Has the limitation been lifted? I am in the proces of flow creation and I am not sure whether to use SOQL or objects...

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,343

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,703

Leaderboard

Featured topics