Activity Forums Salesforce® Discussions What is the difference between getLimitQueryRows() and getQueryRows() in salesforce?

  • What is the difference between getLimitQueryRows() and getQueryRows() in salesforce?

    Posted by Nikita on November 21, 2019 at 7:44 am

    What is the difference between getLimitQueryRows() and getQueryRows() in salesforce?Please explain with an example.

    Yogesh replied 5 years, 1 month ago 3 Members · 2 Replies
  • 2 Replies
  • Prachi

    Member
    November 21, 2019 at 10:44 am

    Hi,

    getQueryRows()-
    Returns the number of records that have been returned by issuing SOQL queries.
    getLimitQueryRows()-
    Returns the total number of records that can be returned by issuing SOQL queries.

    Thanks.

  • Yogesh

    Member
    November 22, 2019 at 7:57 am

    Hello,

    Limits.getQueryRows(): Returns the number of records that have been returned
    by issuing SOQL queries.
    Limits.getLimitQueryRows(): Returns the total number of records that can be
    returned by issuing SOQL queries. This is the 50000 limit on the number of
    rows that our code can cover.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos