Skip to main content

Meet ApexGuru

Learning Objectives

After completing this unit, you’ll be able to:

  • Describe the purpose and benefits of ApexGuru.
  • Recognize common issues in Apex code that ApexGuru addresses.
  • Gain familiarity with using ApexGuru to optimize Apex code.

Introducing ApexGuru

ApexGuru is a GenAI-based feature in Scale Center, designed to fix anti-patterns and hotspots in Salesforce implementations. It aims to streamline the process of identifying and rectifying anti-patterns and performance bottlenecks in Apex code. Developers can use ApexGuru to build more efficient and scalable applications.

ApexGuru uses runtime profiles, providing actionable insights and prescriptive code recommendations. It’s powered by cutting-edge generative AI models developed in collaboration with Salesforce AI Research, redefining the way developers tackle critical scale issues in their Apex code. ApexGuru offers personalized recommendations tailored to the specific needs of each organization, ensuring impactful improvements in code quality and performance.

Note

ApexGuru’s AI capabilities are powered by CodeGen models that Salesforce AI Research develops and pretrains. CodeGen is a family of transformer decoder models trained on code and fine-tuned for ApexGuru’s code recommendation capabilities.

Why ApexGuru?

Scaling efficiently is a critical aspect of designing and implementing applications on the Salesforce Platform. Many customers only become aware of scalability issues when end users begin to report degraded performance and usability—at this point, these issues have already impacted the business. Designing for the future, and predicting and simulating future business traffic, can be challenging. While some errors can be caught during the design phase, most errors occur only at runtime in production and they sometimes manifest during peak loads.

Using scalable and efficient Apex code is essential for developers at all skill levels. ApexGuru helps developers identify and address common issues such as exceeding CPU time limits, inefficient SOQL queries, and potential governor limit violations. With ApexGuru, developers can proactively refine their coding practices and navigate the Salesforce Platform with confidence.

ApexGuru looks at your code and evaluates it for specific governor limits, including:

  • CPU time: Apex code is allocated a certain amount of CPU time for execution. If the code exceeds this limit, a “CPU time limit exceeded” error is thrown.
  • SOQL queries: Salesforce enforces limits on the number of SOQL query issues per transaction, including the number of queries issued and the total number of rows retrieved.
  • Limit on SOQL statement length: A maximum of 4,000 characters is allowed for each string within a WHERE clause.
  • DML statements: There are limits on the number of records that can be processed in a single transaction, including both inserts and updates.
  • Apex character limit: This limit is the aggregate character count in custom Apex codes within the customer’s organization, excluding characters from managed packages.

General Product Considerations

Keep the following in mind as you use ApexGuru.

  • ApexGuru has no impact on org performance or storage limits.
  • Customer code isn’t used for training the ML models for ApexGuru.
  • The AI models that power ApexGuru look at your Apex code to provide high-impact recommendations.
  • Like Scale Center, ApexGuru isn’t supported in Government Cloud Plus.

Access ApexGuru

  1. From Setup, in the Quick Find box, enter Scale Insights, and then click ApexGuru Insights.
  2. Enable ApexGuru for your org by accepting the ApexGuru Agreement.

Resources

Partagez vos commentaires sur Trailhead dans l'aide Salesforce.

Nous aimerions connaître votre expérience avec Trailhead. Vous pouvez désormais accéder au nouveau formulaire de commentaires à tout moment depuis le site d'aide Salesforce.

En savoir plus Continuer à partager vos commentaires