Questions tagged [governorlimits]

Governor limits are limits enforced by the Apex runtime engine to ensure that runaway Apex does not monopolize shared resources in the multitenant environment. These limits are tracked and enforced during the execution of Apex code and if a governor limit is exceeded an uncatchable runtime exception is generated, such as "Too Many SOQL Queries".

Filter by
Sorted by
Tagged with
-1 votes
1 answer
47 views

Salesforce limits on sending email in one hour

One of the user send an important email from an opportunity record to the team members. We can see the email message record in the related list but non of the team members received the email. I want ...
shwarma g's user avatar
0 votes
0 answers
28 views

I want to solve the Too many SOQL queries. How can I reduce the number of queries?

Multiple queries are being executed depending on the data type as follows. I want to reduce the number of queries as much as possible. What should I do? //Get contract event for(ContractInfo__c ...
aeonyet's user avatar
-1 votes
0 answers
32 views

Limit reachout i write my insert statement outside for loop [duplicate]

I write an apex class which insert bulk record, I make list collection variable and using for loop add all the hiring manager record inside it but when I insert this list outside for loop then also I ...
Himanshu Rai's user avatar
-1 votes
1 answer
59 views

Apex : SOQL relationship query on master-detail and lookup objects in APEX

I am trying to create a single query on master-detail and lookup objects Currently, I have three separate queries, which are able to run in Apex and get the expected results. But, the code approach I ...
sf developer's user avatar
0 votes
1 answer
44 views

Usage of Database.getQueryLocator

I am new to the batch class working, and I have a somewhat weird question. When I write this in the start method of a batch class: return Database.getQueryLocator([ SELECT Id, ...
RVK SF's user avatar
  • 9
-1 votes
1 answer
56 views

Custome Metadata getAll() vs SOQL query

I have checked in official documentation that we can use getAll() method to query all metadata records. My apprehension is that does it actually run a SOQL in the background and consume the governor ...
Manuj Pandey's user avatar
0 votes
0 answers
34 views

Failing Salesforce Queue

I am rearchitecting some apex code that I have been handed. I updated an @future method to use the Queueable interface, because as it turns out the method was being called as part of trigger that was ...
Luke Sharon's user avatar
-2 votes
1 answer
30 views

SOQL query to fetch N number of related records

We are having on complex self relation that there will be n number of related records for single record saying Task 1 will have one sub task 1 Sub task 1 will have sub sub task 1 sub sub task will ...
SFDC-Beginner's user avatar
0 votes
0 answers
50 views

Salesforce Batch – Limitations (semi-joins, governor limits)

I need to write a Batch class to delete records from Child to Parents objects: Child__c --> Parent__c --> Parent_Of_Parent__c Every object has approximately 5 million records to delete, so I ...
Alessia's user avatar
0 votes
1 answer
54 views

How to retrieve group members from a group which are only other groups

SELECT Id, Name, DeveloperName, Type, RelatedId, ( SELECT UserOrGroupId FROM GroupMembers WHERE UserOrGroupId IN ( SELECT Id ...
KarlLivesey's user avatar
-1 votes
1 answer
147 views

SOQL limitation in Salesforce standard REST API

I would like to know the row limit for SOQL using standard REST API. I want to use the GET method and retrieve all the records (most probably with out any filter). So the 50k record limit applies or ...
Raham's user avatar
  • 33
1 vote
1 answer
146 views

Max Level Number of Accounts in an Account Hierarchy

I couldn't find this in the documentation, but what is max Level number of accounts in an Account Hierarchy. Thanks.
Andrew L.'s user avatar
  • 837
0 votes
2 answers
87 views

Is each chunk of a batch Apex class transaction gets shared among the trigger which runs before/after each DML of the batch?

If a batch apex is called with size say 200 (default size). And we have a DML operation (say update) in execute method of the batch. So the trigger which is set to run before/after update will share ...
ItsVicky's user avatar
0 votes
2 answers
336 views

How do I check the limit of creating new dashboards(runs as logged in users) in my SF org?

So my org has paid for increased limits and I need to find out the limits for creating new dashboard
Vicky007's user avatar
3 votes
1 answer
175 views

Salesforce Bulkification Across Transactions

Here is a fun question I have been puzzling over. So, I have been learning a lot lately about salesforce bulkification and governor limits, specifically as they relate to bulk upload of data into ...
Luke Sharon's user avatar
0 votes
1 answer
51 views

Apex Batch stops after 2000 records

We have an Apex batch class which processes 2950 records of contacts, sending them emails with Messaging.SingleEmailMessage method(The query has a filter for IsEmailBounced = FALSE AND Email != NULL). ...
DavidS's user avatar
  • 37
-3 votes
1 answer
205 views

How to do pagination using apex and LWC without using OFFSET or WHERE clause to showcase records

I want the logic to be in apex. QueryLocator, queryMore etc have limited application seen with reference to this. I am currently trying to query all the records and slice them accordingly. But, this ...
Bhavya Manjusha C's user avatar
0 votes
1 answer
90 views

How to specify a batch size in apex

I have some custom apex that I am invoking from a flow. The flow is sending a list of lists. The sub-list is a group of 5 sObjects with all the necessary fields to create new records. So I have a ...
Luke Sharon's user avatar
0 votes
0 answers
67 views

Sending more Email Campaigns (with Templates) from ISV Package

I have a Managed Package in the AppExchange that now should make extensive use of Standard Email Campaigns to engage with customers. We don't want to use a complex and heavy extension like Pardot but ...
Robert Sösemann's user avatar
1 vote
0 answers
143 views

Salesforce Flow Pause Element error

I have a salesforce flow that is an invoked flow from a button click on a list. After clicking the button, I send the ID of the parent record to the flow, and get all the child records with a get ...
Luke Sharon's user avatar
1 vote
1 answer
137 views

Getting the top level parent account of an account in hierarchy

I have written a class that gets the id of the top level account in the hierarchy of the given account id. public class AccountUtils { // Create a Map to hold Account Ids and their parent Ids ...
Tony Jude's user avatar
0 votes
1 answer
120 views

Prevent CPU Time Exceeded Governor limit

I have a very small flow. It simply calls an apex action, then an update records element. This is set to run on create or update on the account object. Here's a picture: Although this flow is pretty ...
Luke Sharon's user avatar
0 votes
1 answer
846 views

Flow scheduled jobs reach limits?

I have a scheduled Flow which runs daily and runs a good deal of queries. Is there any kind of risk of reaching a limit (monthly or otherwise) for number of queries which can be run or the "...
Zoom_v's user avatar
  • 3,836
0 votes
1 answer
42 views

Why is the concurrent API limit not present in the Limits data end point?

Looking at https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_limits.htm, I am not able to associate anything with the Concurrent API requests. Why is this limit not ...
Strong Like Bull's user avatar
2 votes
1 answer
477 views

Help understanding Salesforce Governor Limits in a flow while using the Data Import Wizard

I am trying to learn about governor limits in salesforce, specifically in the context of salesforce flows. Here is the context: I have written a flow that runs 'on insert' for a given object (contacts)...
Luke Sharon's user avatar
0 votes
0 answers
99 views

Error retrieving metadata for entities of type: Layout. Error message: record limit reached. cannot submit more than 10 records in this operation

We are using Lightning Aura component to display tabs dynamically based on the record types and Layouts. When trying to retrieve more than 10 records using Metadata.Operations.retrieve in the code it ...
Anika's user avatar
  • 1
1 vote
1 answer
70 views

Giving condition to avoid error SINGLE_EMAIL_LIMIT_EXCEEDED, Email limit exceeded.:

I want to give the condition if already hit the email limitation in Salesforce then the email is not sent. because right now I got the error First exception on row 0; first error: ...
Mustika Farma's user avatar
0 votes
2 answers
422 views

How to know how many custom notifications have been sent in one Apex Transaction (Apex Test)

Currently I'm building a feature that use the Messaging.CustomNotification Apex class, and I'm building the corresponding test methods, but I haven't found a way to check that the notification has ...
Jeferson Ruiz's user avatar
0 votes
0 answers
100 views

Enable Batch Apex process several records for related objects

I'm trying to write a batch class that operates on 2 related objects(Course__c and CourseDetail__c in a master detail relationship) and this batch has to look for all the child records of each parent ...
David Jake's user avatar
1 vote
1 answer
252 views

Does LWC Javascript count towards CPU time limit and Heap Size?

I have been using Apex right now to parse the CSV and I am being thrown with CPU time limit error when there are more number of records. Hence, I am planning to move towards LWC JS as the CSV file is ...
Rahul Allada's user avatar
0 votes
0 answers
62 views

How To Share Files In Salesforce With More than 2000 Users

We have a Managed Package, where three documents are fetched from a third party via API and saved in Salesforce. Once the users are provided with the access of this Managed Package, we need to share ...
Jitesh Goel's user avatar
1 vote
1 answer
106 views

Does it matter which Database.getQueryLocator method I use in regards to soql limits?

I usually use Database.getQueryLocator('soql string') when creating batch classes but I also see there's an overloaded method that takes a List of records, meaning I can use Database.getQueryLocator([&...
TemporaryFix's user avatar
  • 2,867
0 votes
1 answer
231 views

Does Fast Update Flow consume a SOQL when we use the dot-notation to populate fields?

My question is, I have a Record-triggered fast flow on Opportunity. This is essentially a before-insert trigger context logic. Now in my flow, I am using the provided traversal from Opportunity to ...
Apex Srinivas's user avatar
0 votes
1 answer
162 views

Using Map To Convert Value - How To Access Value From This Map And Avoid SOQL In Loop At The Same Time

I'm building an Import feature (any Object can use this) with Flows and Apex action. When user upload a file via Flows, Apex action will go through all row and return output. After done checking and ...
Pam's user avatar
  • 97
0 votes
0 answers
19 views

how can I calculate the max number of records handled concurrently?

With an instance of Salesforce Grants Management for Public Sector, how can I calculate the maximum number of applications that can be handled concurrently? For example, if we receive 4000 ...
Bartley's user avatar
  • 5,237
0 votes
0 answers
68 views

Do email alerts sent from a Flow in a managed package count against Single Email Daily limit?

One of my customers wants to build a managed package that will be sending a lot of emails to Contacts on Subscriber Orgs using Email Alerts in Flows. Will these emails count against the Single Email ...
Stanislav Shcherbakov's user avatar
0 votes
1 answer
641 views

What is the purpose of Concurrent API limit?

As per the Salesforce Documentation, the Concurrent API limit is a limit for concurrent inbound requests (calls) with a duration of 20 seconds or longer and it differs based on the org type: ...
DevelBase2's user avatar
1 vote
2 answers
117 views

SOQL FOR LOOP with Selector Class

I am building a SOQL FOR LOOP and I am wondering whether or not I am getting the advantages by abstracting the SOQL Query to a separate Selector class. Should I instead be placing the SOQL Query ...
Coova's user avatar
  • 180
1 vote
1 answer
179 views

Is List.isEmpty() necessary before a DML? [duplicate]

After working on many different code bases in Salesforce, I noticed that almost all developers check if a list is empty before doing a DML in order to avoid the unnecessary DML statement. Here's an ...
Harout Tatarian's user avatar
0 votes
1 answer
64 views

In the final method of batch class sending callout fails with SOQL Limit

I have a schedulable batch class which is stateful. In execute am inserting upto 1000 records. In final method i have a list of ids of inserted record global void finish(Database.BatchableContext BC) ...
Sushmitha Rao B's user avatar
0 votes
1 answer
442 views

In Salesforce CPQ, Do Summary Variables Count Towards Governor Limits?

Consider the following two Salesforce CPQ scenarios: 1) In one scenario, a Summary Variable can have the following values: Aggregate Function: Sum Aggregate Field: SBQQ__ListPrice__c Target Object: ...
Sully Cooper's user avatar
0 votes
1 answer
137 views

How to reduce database time used to query millions of records in a batch class?

I am running a batch class that queries Line_Item__c in our production org. The query is executed in start method of Batch class. Since we have a total of more than 12 million records in our database ...
Sarvendra Kumar Singh Kishan's user avatar
1 vote
1 answer
177 views

Chunking in Apex trigger for large data sets (without hitting governor limits)

I have a after update trigger which needs 4 SOQL queries. I also have an interface where we load 10k records for this object. There can be a scenario where user tries to update all 10k records. The ...
SEuser's user avatar
  • 1,815
-3 votes
1 answer
112 views

How to prevent loop in batch correct way [duplicate]

I have the following Batch which currently runs. I am still wandering if the way I set my for loops are correct. Is this solution the right way? I have a Quote which is related by several amount ...
Thomas's user avatar
  • 2,294
0 votes
1 answer
484 views

How transaction creation happens with multiple record triggered flows for the same object?

After searching and searching I get more in doubt on how the transaction works in salesforce. I want to believe that if I have one big record-triggered flow it will be run in the transaction of a ...
Jonas Lopes's user avatar
2 votes
0 answers
290 views

Do Flows in a Managed Package Count towards Flow Limits in Professional Edition Orgs

Professional Edition Orgs are limited to 5 active Flows / Process Builders. If a Professional Edition org currently has 5 active flows, and I try to deploy a manage package that has X number of flows. ...
andrew's user avatar
  • 149
-1 votes
1 answer
496 views

How can I show more than 50K records on UI as the SOQL limit is 50000 only?

How can I show more than 50K records on UI as the SOQL limit is 50000 only AND I want to them on UI without pagination or anything?
Dashrath Singh's user avatar
0 votes
0 answers
192 views

How to handle possible query rows limits in batch class

We have a process in which we delete all the records of a custom sObject, and then create new ones using data from other sObjects. Since the query can reach limits, we decided to create a batch class....
joacoiudica's user avatar
0 votes
1 answer
49 views

Building Financial report getting Too many Query rows 50001

I am building a financial report as like below Since we know we are building for the whole year or two year and since its finacial report the number rows will be heavy. Since its finaicial report we ...
SFDC buddy's user avatar
0 votes
3 answers
190 views

Accesssing child records Count towards System.limit exception?

I am trying to loop over child records via accessing child records through relationship(customer_MDM_Customer_Address__r) and not doing any query inside for loop but still getting too many SOQL ...
Dhruv's user avatar
  • 11

1
2 3 4 5
18