Chaining Continuations – would each continuation be executed in separate transaction/limit scope?

When we are chaining Continuation objects in Apex controller, would it be right to assume that each continuation (and apex post processing method) is executed in separate transaction scope, e.g. I could have 100 SOQL statements in processing method for each continuation? Or does the whole continuation chain share the same execution context and should … Read more

community view report via a VF page

Could a report exposed to a SF community (Not Plus), via a VF page? as below; <apex:page id=”ccs” title=”Customer Case Summary” cache=”false” showHeader=”false” sidebar=”false” standardStylesheets=”false”> <body> <div>Customer Case Summary<br/> <apex:iframe src=”00O90000009FCKe”/> </div> </body> </apex:page> I tried this and gave the permission to the VF via profile, it is still giving me no access error, According … Read more

Outbound email message with attachments limit

I am using Apex to send emails with attachments to users (with SingleEmailMessage to be more precisely). From some MB (I Don’t sure exactly the size – because it changed from time to time when I try to check it) It converts the attaches files to .html files for downloading and store them in some … Read more

CANNOT_EXECUTE_FLOW_TRIGGER – System.LimitException: Too many query rows: 50001

I have an apex class that was written by a previous SF Admin and I’m trying to understand why it isn’t working. From what I can tell, it is supposed to auto-populate the Account Name that is associated the Opportunity that this custom object (Campaign Design Profile) record is being created on. When select the … Read more

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 for last 24 hours are far away from the limits. I also found this statement: Salesforce has a limit of 1000 (up … Read more

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 because the amount of records to process and the manual labor is just unpractical. So I came with the … Read more

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(FirstName), count(LastName), PersonEmail FROM Account WHERE IsPersonAccount = true GROUP BY PersonEmail HAVING count(Id) = 1 AND count(FirstName)= 1 AND count(LastName) = 1 ]; Obviously this fails … Read more

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); String recordId = (String)primaryRecord.get(‘Id’); Map<String, Schema.SobjectType> keys = new Map<String, Schema.SobjectType>(); Map<String, Schema.SobjectType> describe = Schema.getGlobalDescribe(); for(String s : describe.keyset()){ keys.put(describe.get(s).getDescribe().getKeyPrefix(),describe.get(s)); } Schema.SObjectType sobjectTypeObj = keys.get(recordId.substring(0,3)); Schema.DescribeSObjectResult obj = sobjectTypeObj.getDescribe(); String query = ‘select Id, ‘; for (Schema.ChildRelationship … Read more

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 salesforce error Problem context: we got a strange situation, the data loader updates less than 1000 records and we maintain the … Read more