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
0answers
19 views

Process Builder - Record Update & Number of DML

In a process builder, if you have a node with multiple "immediate actions" for updating records, do those all get processed as one dml on that record in question or do they each count as distinct ...
0
votes
3answers
44 views

Salesforce governor limit monitor and notify the Administrator

I need your advice to implement a procedure to monitor salesforce governor limit status such as CPU limit, Heap size and warn the administrator before it is reached the maximum threshold and throw as ...
-2
votes
1answer
36 views

How to avoid the 'Too many SOQL queries: 101' error in trigger helper?

I have a before insert and before update trigger with helpers and helper for these helpers. In both helpers I get the 'Too many SOQL queries: 101' error because of queries in loops. How do I get SOQLs ...
0
votes
2answers
23 views

SOQL statements cannot query more than 20 different child types error

I have the following piece of code public static void fetchRelatedRecords(String primaryRecordString){ SObject primaryRecord = (SObject)JSON.deserialize(primaryRecordString, SObject.class); ...
2
votes
1answer
133 views

Is there any way to extract more than 50k records inside execute method of batch?

I have a batch working on approx 40k records in chunks of 200 records. Inside execute of the batch I am querying from one abject returning more than 50k records. Getting 500001 error. How to remove ...
0
votes
0answers
10 views

Cache storing objects greater than 100 KB

we use the salesforce org cache in one of our flows and we are getting Cache.ItemSizeLimitExceededException. I queried the cache and found that although the limit specified according to this doc is ...
0
votes
0answers
30 views

Inserting an object is causing it to be updated multiple times before it finishes

Been trying to navigate around this opportunity object that has been causing us deployment issues for a while now (aka anytime a new anything is added, high chance of older test classes to error out ...
1
vote
1answer
27 views

Do report subscriptions contribute to email limits?

So I have a group of users (around 20 users at least) for which I wish to subscribe the reports as a System Administrator in lightning experience. It is required that only the admin can subscribe and ...
0
votes
1answer
47 views

LWC Custom file-upload without file size limit 4Mb

Does anyone know the way to write custom file-upload on lwc based on html input and file size limit at least 20Mb?
0
votes
1answer
38 views

Creating Utility Classes - Batching sObject list

My goal is to create a reusable and scalable utility class that can perform different DML operations. I'm aware of the 10,000 DML processed records limit so I'd like to check if the list is greater ...
3
votes
1answer
73 views

Do Process Builder/Workflow Actions count against DML/SOQL governor limits?

This might seem to be a fairly simple question but I cannot find documentation which clearly states this. I have doubts about these questions- Do workflow/process builder actions such as field ...
0
votes
1answer
34 views

SOQL on Organization object

I was trying to get sandbox name in my apex for logging purposes. I didn't find any direct way and hence I did the following using IsSandbox from Organization object, String envName = ''; ...
0
votes
0answers
12 views

queuing batch controller which has Outbound calls to get record details from external appilcation

I am requesting external application from SF on daily basis to get records and sync. I have 5-10 custom objects in our environment. I have to make API calls individually to get all those records and ...
1
vote
0answers
38 views

Heap Size and Substring Issue

We have the following code: System.debug(Limits.getHeapSize()); String one = '1234567890'.repeat(myRepeater); System.debug(Limits.getHeapSize()); String oneLine = '1234567890'; System.debug(Limits....
0
votes
2answers
32 views

Catch System.LimitException in Batch to send error via Email

I created a batch that processes data based on certains parameters sent by the user and then sends the result via email. But sometimes the parameters are too ambitious and the batch throws a System....
0
votes
2answers
27 views

AggregateResult query limit

I'm trying to query for all unique accounts that has a first name, last name and person email by using this query: List<AggregateResult> checkUniquePersonAccounts = [ SELECT count(Id), count(...
0
votes
2answers
73 views

Before Insert Trigger SOQL Limits

I am building a before insert trigger on hed__Program_Enrollment__c. What I am trying to do is delete everything in the hed__Program_Enrollment__c table based on a certain condition and this seems to ...
0
votes
0answers
21 views

Refactor formula to avoid exceeding character limit

I have the following formula field: IF(AND(TEXT(Method__c)="FedEx Ground", Residential__c = TRUE),"GROUND_HOME_DELIVERY",IF(AND(TEXT(Method__c)="FedEx Ground", Residential__c = FALSE),"...
0
votes
1answer
106 views

Too many callouts 101

I am making a callout to a webservice to retrieve records and upsert them into Salesforce. When I execute my batch class with a small set of records, they're inserted in Salesforce properly. However ...
1
vote
1answer
103 views

Batch Job Governor Limits

We have two custom objects - obj1 and obj2. These are related by a custom Id. We need to iterate through obj1, get its relevant records from obj2 based on Id and further query for permission of each ...
0
votes
1answer
32 views

API Request Limits

I have read the article: https://developer.salesforce.com/docs/atlas.en-us.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_api.htm Can someone, ...
6
votes
2answers
169 views

Current state of reliable execution scheduling

A number of approaches to more reliable scheduling and continuous processing have been used over time on the Salesforce platform, all of them suffering from serious drawbacks. These include: suicidal ...
0
votes
0answers
39 views

How to add cc & bcc in Messaging.SingleEmailMessage Email and simultaneously avoid single Email limit being hit

My requirement is to send single email with To/Cc/Bcc added. All the email Ids belong to internal users. Initially, when I was passing the User.Id to these methods, I was hitting the Single Email ...
1
vote
0answers
35 views

DLRS making too many queries to its own object

Our org is using real-time DLRS fields on a few custom objects related to a custom sales order management implementation. The fields are basically there to summarize order total when order items ...
0
votes
1answer
58 views

Aggregate Query on 900K records - how to do this?

Hello fellow developers, I need to run an aggregate query on 900K telephone records to add up a field (grouping by phone line id) and record results in the "summaries logbook". I have tried ...
0
votes
2answers
36 views

app exchange managed package computational cost

A managed app published in AppExchange by Vendor A. Customer A installs this managed package in his Salesforce org. When customer A excutes this managed app in his org, Will the Vendor A be charged ...
0
votes
0answers
33 views

Flow Using more than Object

Trying to build a flow that used GET RECORD to pull a filtered list of Opportunities, and use the AccountIds from these Opportunities to update a list of Accounts. The only way I have achieved that ...
0
votes
0answers
15 views

REST Endpoint vs sobjects Endpoint

I want to get my understanding right on API Limits. Currently to update an object from an external application we are hitting the below endpoint. /services/data/v44.0/sobjects/CustomObject__c/...
0
votes
1answer
24 views

FATAL_ERROR System.ListException: Before Insert or Upsert list must not have two identically equal elements

In below block of code I am trying to insert 4 accounts first 2 of type aType and then 2 more of type bType. Account[] accountToInsert = new Account[0]; Account[] accountToInsertAtype = new Account[...
2
votes
2answers
87 views

Flow Hitting Governor Limits

I have an issue with the following flow : I have a field source on contacts populated automatically by an external Id. Partnership is a custom object on which I can set another source field. When ...
2
votes
1answer
110 views

Get Children Records out of Loops in Flows

Dear StackOverflowers, This is my first question on SO, so please bear with me if you find it naive. I have looked up and down the platform and surprisingly, I haven't been able to find a similar ...
0
votes
1answer
44 views

Salesforce - Talend Integration: API limits

We have created a API only user in our org, and are using Talend job (auth through this user) to login every 5 min and checking for any new opportunity created. If yes, then that opportunity is ...
0
votes
0answers
66 views

SOQL Count query on large number of records

I am attempting to run a count query in workbench(and dev console). I am simply trying to count the number of records within the object(with 2 where statements). My estimation is that there is ~28 ...
0
votes
1answer
47 views

How to BULKIFY my code? [duplicate]

I am having a really hard time bulkifying my code, and need to do so becasue I am reaching the SOQL limit on execution. Here is my code as of now. public class Zenefits_Time_Off implements ...
1
vote
0answers
38 views

SOQL 101 issue, Need help in trimming Trigger code

I have the following trigger which is possibly a culprit to cause this SOQL 101 issue. I am not an expert so not see what is wrong here, so I need an expert to advise and suggestions where I have ...
0
votes
0answers
50 views

How to design solution for querying 200k+ records and using that inside LWC?

I have a problem statement where I need to design an LWC component to enter policy information and check if that policy already exists in the system and print a report of those that aren't in the ...
1
vote
2answers
32 views

Single Email Limit Exceeded

I am hitting an apex error in production: "SINGLE_EMAIL_LIMIT_EXCEEDED". I have unit tests in production that run when I do the deployment that call methods as part of the test that send out email ...
0
votes
1answer
24 views

Avoid governance limit for bulk-assign a large number of records to unique contacts

Let's say I have a generic "container" record that is used to store JSON responses from third-party API's. These Container records have a single field 'data', which is a JSON string identifying ...
2
votes
2answers
76 views

CPU time limit jumps from 2000 to 14000 after a trigger ends

Hi I am having trouble with the Apex CPU time limit. I've optimized my code as much as I know how to, but when my trigger finishes running it goes from 2000 to 14000. Does anyone know what else is ...
0
votes
1answer
38 views

Need work around for salesforce limitation when making callout

I have searched but i didn't get how to fix this issues Actually I'm making callout to Google Vision Api from salesforce apex class. When i m uploading image with more text content, response from ...
0
votes
2answers
46 views

How to implement Apex Batchable properly, need to update ~5M records

I need to update CampaignMember, the value that I need to insert is in Opportunities, but there are more than 4 Million records, I was using Jitterbit and Excel to do this, but is very difficult ...
0
votes
0answers
18 views

Salesforce grouping execution flow

Is possible Salesforce be agroupping the Lighting flow execution? We are working with Platform events calling a specific Lightning flow each time it runs, and we noticed the flows are being executed ...
0
votes
1answer
63 views

Calculating getDmlStatements

I am wondering how I can calculate DMLStatements. The test below adds unexpectly 3 instead of 1 -> after insert. Why? System.debug( Limits.getDmlStatements( ) );//0 Account ac = new Account( Name = '...
0
votes
0answers
356 views

How to debug the error: 'Apex CPU time limit exceeded'

The trigger written in my salesforce org is hitting the apex cpu time limit . Hence I am trying to optimize apex code and reducing the workflow updates. But below log is confusing me about the apex ...
0
votes
1answer
48 views

Trying to update records by scheduling an apex class. However, I'm getting CPU Timeout Error with the code below. Am I suppose to use maps?

List<Deal__c> records = [ SELECT Name FROM Deal__c WHERE CloseDate__c < TODAY AND RecordType.Name = 'Franchise' AND (StageName__c != 'Servicing' OR StageName__c != 'Closed Lost') ]...
0
votes
1answer
134 views

Reaching Connect API's hourly request limit for this user and application?

I`ve got this type of error during the work in Lightning Community: You have reached the Connect API's hourly request limit for this user and application. Please try again later. My API Requests ...
0
votes
1answer
24 views

How to bypass read timed out error while making callouts?

I have been trying making a request to Amazon Web Server, to send a document. In the request header, I am required to set a header named, Content-Length, which is currently being set to the BodyLength ...
0
votes
2answers
38 views

Get the number of SOQL calls in manage package

My org has a manage package installed. Is there any way to detect how many SOQL calls it has done in apex? I have code that fires because of it. Once a certain number of SOQL calls have been attempted ...
0
votes
2answers
182 views

How do I see limits associated to REQUEST_LIMIT_EXCEEDED: TotalRequests Limit exceeded

After using sfdx force:source:deploy a good amount today to deploy to production (see how to here), I hit the following error: ERROR running force:source:deploy: REQUEST_LIMIT_EXCEEDED: ...
1
vote
1answer
310 views

System Permissions Assigned to Permission Set

Is there a SOQL/SOSL to export/FETCH only the System Permissions from a Specific Permission Set in Salesforce.

1 2 3 4 5 14