New answers tagged

1

Maintenance in the main. However Recordtypes are held in resident memory, and can be retrieved via Schema describe calls, making recordtype and high performing feature, but yes Salesforce would be wearing the overhead of recordtypes sitting in RAM, so I suppose it is a bit of both. I think you might have another question that relates to best way forward for ...


1

The maximum callout size is "heap size" worth of data (per transaction), 6MB for synchronous Apex, 12MB for asynchronous Apex. As such, you won't be able to do this purely in Apex. You may want to look at using an external service to help, like you say. I'm not familiar with Mulesoft, but you could easily host your own solution in Heroku, AWS EB, ...


3

Without seeing your org, it is impossible to say for sure, but almost certainly what is happening here is that you have triggers consuming this governor. Most likely would be triggers on OpportunityLineItem itself, but you might also do cross-object logic which then interacts with other triggers and consumes more queries. The upsert keyword in and of itself ...


0

My 2 cents: You are looking to associate address record to referral record based on the city and postal code of the incoming referral data. In most of your SOQL's you are using city,postal code or static values like below to query and (ADDR_COMPANY__c Like '2%'or ADDR_COMPANY__c Like '1%') and SAM_KEY__c Like '2%' You can try to create Map of records ...


1

Salesforce has restriction that future methods cannot be called from Batch class.It will throw error "FATAL ERROR: Future method cant be called from future or Batch". To avoid this Queueable Apex is the best option, it is a hybrid model of Future and Batch apex which supports getting called from batch apex and even from future. You then have ...


1

As hinted by this article and as explained in this previous Q&A, a trigger for an SObject (rather than Platform Event) is invoked with up to 200 records at a time. If you have more than 200 records of the same object type in your DML insert/upsert/update then the trigger is called multiple times with different chunks of the DML records. You then have ...


3

Your problem is the aggregate query: AggregateResult[] miAccountList=[ SELECT Account_Item_Owner__c FROM Master_Inventory__c WHERE CreatedDate = LAST_N_MONTHS:2 GROUP BY Account_Item_Owner__c ]; Right now, you pull 2 months of data for all accounts in your system, even though you already know which Account records you care about. The most ...


3

While neither code snippet is a complete example, the key distinguishing factor appears to be these lines: for(Equipment_Maintenance_Item__c e : eMLlist.values()){ versus for(Equipment_Maintenance_Item__c e : closedCasesM.get(caseLoop.ParentId).Equipment_Maintenance_Items__r){ In the first version, your inner for loop iterates over all ...


Top 50 recent answers are included