Asked by: Angustias Macias
asked in category: General Last Updated: 27th March, 2020

What is database getQueryLocator in Salesforce?

Database. getQueryLocator returns a Query Locator that runs your selected SOQL query returning list that can be iterated over in bathc apex or used for displaying large sets in VF (allowing things such as pagination).

Click to see full answer.


Also, what is database BatchableContext in Salesforce?

Database. BatchableContext represents the parameter type of a batch job method and contains the batch job ID.

Secondly, how many records can be fetched using database Querylocator in start method? Its worth noting that while the governor limits are bypassed in the start() method, there is still an overall limit of 50 million records, per the docs: When you're using a simple query (SELECT) to generate the scope of objects in the batch job, use the Database.

Correspondingly, what is database stateful in Salesforce?

Stateful is when the execute method modifies a class variable in a way meant to be used across multiple execute methods or in the finish method. The majority of batches you will ever write will not need Database. Stateful. It's important to know that using Database.

What is dynamic SOQL in Salesforce?

Dynamic SOQL. Dynamic SOQL refers to the creation of a SOQL string at run time with Apex code. Dynamic SOQL enables you to create more flexible applications. For example, you can create a search based on input from an end user or update records with varying field names.

28 Related Question Answers Found

What is database Querylocator?

Why future method is static in Salesforce?

What is heap size in Salesforce?


What are interfaces in Salesforce?

What is future method Salesforce?

What is Apex in Salesforce?


What are batch classes in Salesforce?

WHAT IS interface in Apex Salesforce?

What is stateful and stateless in Salesforce?


What is Governor limits in Salesforce?

What is scheduled apex in Salesforce?

What are governor limits in Apex and Salesforce?


Can we call future method from batch apex?

Can we call a future method from trigger?