Spring ’23 Enhancement in Apex

Gray Frame Corner

Database and Search methods support an accessLevel parameter that lets us run database and search operations in user mode instead of in the default system mode.

0218

1. Secure Apex Code with User Mode Database Operations (Generally Available)

White Frame Corner
White Frame Corner

ApexTypeImplementor  object can be used to find Apex classes that directly or indirectly implement an interface. Using a SOQL query, you can get information about public or global Apex implementors

0218

2. Find Which Apex Classes Implement an Interface

White Frame Corner
White Frame Corner

DataWeave in Apex makes data transformation easier to code, more scalable, and efficient. This will remove work of file formats and developer can focus on other work.

0218

3. Use DataWeave in Apex to Enable Data Transformation to Different Formats (Beta)

White Frame Corner
White Frame Corner

We can now delay asynchronous job by 0-10 minutes. The delay is ignored during Apex testing.

0218

4. Use the System.enqueueJob Method to Specify a Delay in Scheduling Queueable Jobs

White Frame Corner
White Frame Corner

Admins can define a default delay (1–600 seconds) in scheduling queueable jobs that were scheduled without a delay parameter.

0218

5. Specify an Org-Wide Default Delay in Scheduling Queueable Jobs

White Frame Corner
White Frame Corner

Database.queryWithBinds, Database.getQueryLocatorWithBinds, and Database.countQueryWithBinds methods, the bind variables in the query are resolved from a Map parameter directly with a key rather than from Apex code variables

0218

6. Dynamically Pass Bind Variables to a SOQL Query

White Frame Corner
White Frame Corner

Admins can now restrict anonymous Apex execution to core users, such as Standard and CsnOnly users. This is done by RestrictCommunityExecAnon preference.

0218

7. Restrict Anonymous Apex Access to Core Users

White Frame Corner
White Frame Corner

To better protect your data and users, Salesforce changed the behavior of Apex static variables. These resets the values of those static variables within a single transaction

0218

8. Static Variables Are Reset Within a Transaction Between Groups of Platform Event–Triggered Flow Interviews

White Frame Corner
White Frame Corner

Thank You

Gray Frame Corner