Skip to main content

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 vote
2 answers
80 views

Is Apex Trigger considers two updates on different records from two users into a single transaction?

If 2 users in SF try to insert accounts at the same time(assume it) considering we didn't bulkified our code in helper classes. Now we know, whenever users try to use such functionalities from SF UI ...
Subrato Kumar Mahato's user avatar
0 votes
0 answers
44 views

Optimizing Apex Trigger Code on Opportunity [duplicate]

I've built a few custom Salesforce flows on the Opportunity object to automate processes, however I keep running into the reoccurring issue of the SOQL queries timing out and my flows failing the ...
Sophia's user avatar
  • 35
0 votes
2 answers
50 views

How to run Schema GlobalDescribe code as a Batch Job (or how to satisfy the governor limits)

I wrote this code to update the FLS Read, for a given Permission Set, across ALL Objects and ALL fields in my org. It definitely hits the 10001 Governor Limit when it tries to insert that many ...
Ryan McNeely's user avatar
1 vote
0 answers
48 views

Calculating temporal metrics with a large dataset

I'm having an issue with a requirement to calculate different metrics for groups of users within a specific date range. We expect that by pressing a button, we can generate a PDF displaying these ...
Renzo Gambino Fornasin's user avatar
-1 votes
1 answer
45 views

OpportunityTrigger: System.LimitException: Too many SOQL queries: 101

I'm not sure if you can help. I'm just an admin, not a developer. but when I try and Mass Update using Dataloader, I get that error message. Wondering if anyone could fix it for me so I don't get that ...
MyaH's user avatar
  • 1
7 votes
1 answer
1k views

I'm exceeding 50k query rows with a child query, and no exception. Why does this work?

TL;DR I wrote a query on Account with a subquery for ChildAccounts It's returning more than 50,000 rows total (25k parent accounts + 60k child accounts) I have no idea why I'm not running into the ...
Derek F's user avatar
  • 63.2k
1 vote
2 answers
192 views

Are Publish immediate DML and DML Statements 2 different limit sets in Apex transaction?

We see in a debug log, as below: Number of DML statements: 1 out of 150 Number of publish immediate DML: 59 out of 150 Do we have separate limits for above 2 for a single transaction in apex?
Sheetal's user avatar
0 votes
1 answer
62 views

Why do I hit the 50K query limit on an object with fewer than 12K records?

I'm working with some code in a complex context that may be above my pay grade (admin who knows enough code to be dangerous). The code below is throwing a 50K query limit exception, even though the ...
C. Ogden's user avatar
1 vote
1 answer
149 views

Within Governor Limits: Split a Large Text File Apart In Apex

I am writing a class that splits text file apart. Chunking them into 5000 line groupings so I can upload the files contents to another limited system. The text file contains a Json object on each line....
Ryan Sherry's user avatar
-1 votes
1 answer
85 views

Does using uiRecordApi in lwc count towards salesforce orgs daily API limits?

I have been using uiRecordApi in my LWC components and I am wondering does it count towards my orgs daily API limits
gottedev's user avatar
-1 votes
1 answer
56 views

Too many query rows: 50001 in Production

We are getting Too many query rows: 50001 error in production during a data load activity of an Sobject. we have an active trigger on this Sobject. But we have only 14K records for this object in ...
Raham's user avatar
  • 43
0 votes
0 answers
38 views

Too many query rows exception during Data load

We have a trigger on a parent object where we query the child records for newly inserted/updated parent records. We are getting too many soql exception when more than 50K parent records are loaded. We ...
Raham's user avatar
  • 43
0 votes
1 answer
75 views

How to get the minimum and maximum closedate from Opportunity object without hitting query limit

I have a checkbox lightning-input filter on a dashboard that needs to show all quarters that opportunities have been set to close (Q2-2023, Q3-2023, Q4-2023, Q1-2024... etc). Therefore, based on User ...
louis's user avatar
  • 61
0 votes
1 answer
254 views

Workaround for Offset limitation

I am currently working on setting up REST service in salesforce where in consumer can pass few parameters based on which there is logic to build and combine SOQL results and send in response Sometimes ...
sf_user's user avatar
  • 2,260
0 votes
1 answer
228 views

Flow Error ID: 64105330-17260 (738334238) organization has exceeded the maximum limit for this feature

I have a record-triggered flow (created or updated). The flow works fine when triggered by a single record, but gives the following error while multiple records are created/updated. Salesforce Output ...
Goat123's user avatar
0 votes
0 answers
93 views

Got a limit exception error even when the soql query is outside the for loop

just a question. Let's say I have apex class that are updating bunch of records using dml in a list which will trigger if the picklist is change, then execute the code. If a dml is triggered, will ...
Squidward's user avatar
0 votes
1 answer
55 views

Trying to find the governor limit that would apply to my particular flow

I have a app installed in an org that lets the company send bulk emails via Sendgrid API (not via Salesforce). The leads and contacts get an EmailMessage record added, whith the relatedTo.Id being a ...
user1702965's user avatar
0 votes
0 answers
35 views

Salesforce ISV Managed Package, storing sObject Ids in 556 filterable text fields, possible concerns

I am working on an App and am coming up with the object model. I am using custom Log__c records, and, of course, I want to limit having excessive records if possible. I want these logs to contain text ...
Questioner's user avatar
-1 votes
1 answer
65 views

Get top most UserRole id in a trigger without hitting governor limits

Object: UserRole. I am writing a trigger Scenario: given a child record I want to traverse and get the role name of each parentId in the hierarchy. Would like to accomplish this using an apex method. ...
torpedo's user avatar
0 votes
0 answers
84 views

Help Understand Salesforce Governor Limit and Apex

I am having a tough time understanding the governor's limits. I have a huge flow that does a bunch of CRUD. I keep getting an email that goes like this: Caused the following Apex resource warnings: ...
Simple Code's user avatar
0 votes
1 answer
48 views

Too many soql rows :101 for SOQL query on user object

I have an issue on running some functionality from the front end. while executing the user query, the system gives an error message Too Many SOQL rows:101. I have checked the code, it is not inside ...
SFDC LWC's user avatar
3 votes
2 answers
793 views

Using Apex, how do I monitor the daily @future limits?

This support article indicates that I have a limit of 250k @future methods per day. However, I can't find the corresponding Limit class function to monitor this limit. I've tried: System.debug(Limits....
Jackson Sardello's user avatar
-1 votes
1 answer
677 views

How to fix Aggregate query does not support queryMore(), use LIMIT to restrict the results to a single batch

Apex class : public static List<AggregateResult> calculOppN1(String userId, List<Id> filialeIds, List<Id> marketIds , Integer count , Date startDateN1 , Date endDateN1){ ...
Fark's user avatar
  • 27
1 vote
0 answers
208 views

Scheduled flow kicks off record triggered flow. Failure:

I have a scheduled flow that runs daily and checks a box on a filtered set of cases. There are about 200 cases it should find and execute on given the filter conditions. Then I have a record triggered ...
Hailey's user avatar
  • 11
-1 votes
1 answer
739 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
48 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
  • 11
-1 votes
1 answer
266 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
317 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
0 votes
1 answer
1k 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
196 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
190 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
72 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
1k 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
1k 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
  • 43
1 vote
1 answer
608 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
  • 857
0 votes
2 answers
475 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
6k 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
553 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
89 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
2 answers
884 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
591 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
89 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
443 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
762 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
385 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
3k 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,904
0 votes
1 answer
57 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
2k 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
198 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
0 votes
1 answer
85 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

1
2 3 4 5
18