Skip to main content Join us at TDX in San Francisco or on Salesforce+ on March 5-6 for the Developer Conference for the AI Agent Era. Register now.

#Batchapex1 discussing

[▶️]🔴🔥🎬 Improve SOQL Performance By Using Apex Cursors

Apex Cursors are a new beta feature in Salesforce Summer ’24 release that allows you to work with large datasets retrieved using SOQL queries. Unlike SOQL which returns the entire dataset at once, Cursors retrieve data in manageable chunks, improving performance and memory usage.

 

Cursors provide some advantages over Batch Apex, such as:

  • Forward and backward navigation within the results.
  • Ability to be chained in a series of queueable Apex jobs.

Cursor processing occurs within a single transaction, ensuring data consistency. Cursors are an alternative to batch Apex and address some of batch Apex’s limitations. Cursors are also more powerful because they can be used in a chain of queueable Apex jobs.

🎬 https://youtu.be/Uvcl3E8e7lM

📒 https://sudipta-deb.in/2024/06/improve-soql-performance-by-using-apex-cursors.html

 

[▶️]🔴🔥🎬 Improve SOQL Performance By Using Apex CursorsApex Cursors are a new beta feature in Salesforce Summer ’24 release that allows you to work with large datasets retrieved using SOQL queries.

@The Blog Group

 

#Summer24 #Apex #Cursor #Batchapex #New Releases #Release Readiness@* Release Readiness Trailblazers *

2 comments
0/9000

I wrote trigger on Account object, When I test the Trigger it was working fine when I entered the the record manually., But Trigger is not fired when the data is coming through integration even it passing all the criteria. Please help me why the trigger is not firing

. #BatchClass, #Batchapex, #Triggers,@developers

7 answers
  1. Oct 1, 2024, 2:10 PM

    Hi Naveen,

     

    Check the following things,

     

    API User Permissions: Verify that the integration user has the necessary permissions to trigger the logic.

    Integration Method: Ensure the API method used (like create, update) aligns with your trigger logic.

     

    please mark this answer helpful if it solved your query.

0/9000

I would like to identify in my org what are the scheduled classes that are scheduled to run at a specific time. I wanted to identify this for the apex classes and flow.

 

I don't want to go to Setup -> Scheduled Jobs and check since my dev environment doesn't have all the classes running or scheduled. I also tried SOQL query suggested here (https://salesforce.stackexchange.com/questions/99796/unable-to-find-schedule-job-for-apex-class) but it only shows the scheduled classes that are scheduled to run and not all the classes that are scheduled. :(

 

Does anyone know if there is a way to retrieve these classes? Why can't Salesforce provide a field in the list view to classify scheduled classes vs normal apex classes? It's puzzling.

 

#Apex #Flow #Scheduled Flow #Schedulable Batch Job #Batchapex 

1 answer
0/9000

Hi, I have a batch apex that retrieves an object, that will update data in 5 different objects. I am getting heap issue. I used Limits.getHeapSize(); I cleared list after inserting(accList.clear()). In debug log with getHeapSize() shows similar size, not much difference. But in anonymous there is a change.

 

I am unable to find what is the exact heap size, where it get exceeded. Debug logs are of no use. I also tried queueable apex to insert a list and clear it later.

 

How to debug properly for this issue?

#Batchable #Batchapex #Salesforce Developer #GovernorLimits #Apex

2 answers
  1. Oct 21, 2023, 4:23 PM

    @AMAN GARG I Created a sample batch apex with perfect optimization. But the issue is, it shows the same heap size in Limits.getHeapSize(); Probably We can say it is async, but how to exactly know where the heap gets exceeded?

0/9000