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
0
votes
1answer
15 views

Why Apex has much lower limit of simultaneously scheduled actions comparing to Process Builder?

From Apex DeveloperGuide: Apex Scheduler Docs: You can only have 100 scheduled Apex jobs at one time. You can evaluate your current count by viewing the Scheduled Jobs page in Salesforce and ...
0
votes
2answers
17 views

Is it possible to change the size of the Auto-Chunked Batches in bulk API

We are implementing a Bulk API V2 client in order to insert hundreds of thousands of records. Our current implementation is the following : first we create a job we add a batch containing all the ...
0
votes
1answer
19 views

Bulk Updating Records in Apex from List?

I am writing code that calls an API to get external client info. I'm at the point where I have it working but I am wondering if there is a more efficient way to save the data to the Account object. ...
1
vote
0answers
29 views

Hitting concurrent Request Limit!

Because of COVID-19, a new urgent web-form has been created in Salesforce Service to receive the customers' requests. This new web-form was published yesterday through Sites and many requests are ...
2
votes
3answers
32 views

Do we get new governor limits in test classes for each test method?

Do the governor limits refresh for each testMethod or we just get specific governor limits for each test class (for instance - SOQL limits 100+100 for test.start/stop)? Please don't tag best ...
1
vote
1answer
36 views

Batch - too many SOQL Queries 201

I'm trying to get a count of how many placements are on an account. If the record type is subcontract, I want the query to look at the subcontract field on the placement and if the account record type ...
0
votes
1answer
25 views

I am getting lots of email from salesforce- Saying exite governer limt?

Can you please help me with what I am doing wrong here? Please help me? public with sharing class ReservePaymentHandler { //Variables public static List<coverBenefitWrapper> ...
1
vote
1answer
43 views

Apex Scheduler with CPU time limit problem

I have been reading about CPU time limit, but can't seem to find a solution to my scheduler. Can someone help me? How can I improve this? It works in Sandbox, but not in Production. Error message: ...
1
vote
0answers
25 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
48 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
39 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
24 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
139 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
11 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
37 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
28 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
96 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
149 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
123 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
45 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
39 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
35 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
83 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
140 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
124 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
33 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
173 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
50 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
37 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
64 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
16 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
25 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
89 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
174 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
59 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 ...
1
vote
0answers
97 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
64 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
35 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
25 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
77 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
40 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
19 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 ...

1
2 3 4 5
14