Skip to main content

Salesforce Spring 21 Release for Developers. Major changes

About Us
Published by jetbi
05 May 2021
133

The Spring ’21 release brought a lot of valuable features to Salesforce. New features provide great solutions in enhancing business productivity and development. We have prepared an overview of the most interesting updates for Developers.

  1. Create a Lightning Web Component Action (Pilot)

Create a Lightning Web Component (LWC) and use it as a quick action. Lightning Web Component actions work side by side on your pages together with Lightning component and Visualforce actions. LWC actions offer advantages such as the ability to easily customize headers and footers and to create actions that have no UI representation. Available to organizations that enable the pilot feature.

  1. Attach Actions to Asynchronous Apex Jobs Using Transaction Finalizers (Beta)

With Spring ’21, the Transaction Finalizers feature is in beta. A new limit establishes that a Queueable job that failed due to an unhandled exception may be re-enqueued five times by a Transaction Finalizer. This limit applies to a series of consecutive Queueable job failures. The counter is reset when the Queueable job completes without an unhandled exception. Finalizers can be implemented as an inner class. Also, you can implement both Queueable and Finalizer interfaces with the same class.

The System.FinalizerContext interface contains four methods:

  • getAsyncApexJobId method: Returns the ID of the Queueable job for which this finalizer is defined.
  • getRequestId method: Returns the request ID shared by both the Finalizer execution and the Queueable job to which the Finalizer is attached. This shared ID helps in filtering logs of a Queueable job and its attached Finalizer.
  • getResult method: Returns the System.ParentJobResult enum, which represents the result of the parent asynchronous Apex Queueable job to which the Finalizer is attached. Valid values for the enum are SUCCESS, and UNHANDLED_EXCEPTION.
  • getException method: Returns the exception with which the Queueable job failed when getResult is UNHANDLED_EXCEPTION, null otherwise.

To attach actions to your Queueable jobs, you must implement the FinalizerContext interface. Only one finalizer instance can be attached to any Queueable job. You can enqueue a single asynchronous Apex job (Queueable, future, or batch) in the finalizer’s implementation of the execute method. Callouts are allowed in finalizer implementations. For more information on implementing Transaction Finalizers, including examples, see Transaction Finalizers (Beta) in Apex Developer Guide.

  1. Obtain a map containing all custom metadata records or a single record sObject for a custom metadata type

Use the new Apex getAll(), getInstance(recordId), getInstance(qualifiedApiName), or getInstance(developerName) methods to retrieve custom metadata type records. So no more SOQL query to fetch custom metadata records.

Map<String, Custom_Metadata__mdt> allRecords= Custom_Metadata__mdt.getAll();

The sample below returns a single record sObject for the custom metadata type named Custom_Metadata_mdt with record ID specified as m00000000000001.

Custom_Metadata__mdt md = Custom_Metadata__mdt.getInstance('m00000000000001');

  1. Convert an 18-character Id value to a 15-character case-sensitive string

Use the to15() method in the System.Id class. This method uses the case-sensitivity checksum in the 18-character Id value to fix any mangled casing and returns a 15-character case-sensitive string.

Example:

String Id_15_char = '0D5B000001DVM9t';

String Id_18_char = '0D5B000001DVM9tkAh';

ID testId = Id_18_char;

System.assertEquals(testId.to15(),Id_15_char);

  1. SOQL, select all fields

Salesforce Object Query Language (SOQL) now makes it easy to include predefined groupings of fields within a query statement using the new FIELDS() function. Use FIELDS(ALL), FIELDS(STANDARD), or FIELDS(CUSTOM) in your SELECT statements.

In general new features improved the usability of the development. Now it is not necessary to create lightning components for using LWC in Quick Action. Also simplified custom metadata selection, which allows you to develop applications faster with custom metadata. New features speed up application development.


Sahib Gadzhiev
Software Engineer
image
Question to the expert
image

We have available resources to start working on your project within 5 business days

1 UX Designer

image

1 Admin

image

2 QA engineers

image

1 Consultant

image
Related Articles
All articles
image
Is Salesforce Winning the Public Sector Race?
An analysis of Salesforce's rapid expansion into the U.S. public sector, tracing its path from cautious early government licensing deals in the 2010s through the launch of Government Cloud in 2012, its pivotal role in COVID-19 vaccine rollouts, and its 2025–2026 push into military and intelligence work via Agentforce and Missionforce. The piece covers major 2026 contracts — including a $5.6 billion Army deal, a $1.6 billion VA agreement, and Pentagon Impact Level 5 authorization — alongside real-world case studies like California's REAL ID processing and the UK's NHS back-office operations. It also examines the structural obstacles still facing Salesforce and other vendors in government tech: legacy IT systems decades old, outdated federal procurement rules, budget constraints, and organizational caution around AI adoption, plus the competitive pressure from Palantir, Microsoft, and Oracle in the race for public sector AI spending.
28 August 2026
image
Why Your Salesforce Flows Are Agentforce's Biggest Problem
This article argues that the most underestimated risk in Agentforce deployments isn't data quality — it's the automation layer: years of overlapping Flows, Process Builder processes, Apex triggers, and managed package logic that no one has reviewed end-to-end. It explains why AI agents inherit automation complexity without the tribal knowledge human admins carry, why technical debt only becomes visible after an agent hits it in production, and why a clean demo is no indicator of production readiness. The article closes with a concrete, tool-by-tool inventory approach using Flow Trigger Explorer, Salesforce Optimizer, Setup Audit Trail, Apex Debug Logs, Agent Builder, and Health Check — scoped to the specific processes the agent will actually use rather than the whole org.
23 July 2026
image
How to Wire Multiple Salesforce Projects in One Org Without Breaking Everything
This article maps the real integration patterns that emerge when multiple Salesforce projects — both managed packages and unpackaged code — share a single org. It covers four concrete patterns: attaching custom triggers to package-owned objects, calling global members exposed by managed packages, writing directly into another project's objects, and runtime-guarded reads of package data. It then addresses access control for authenticated and guest users, including the Master-Detail wall and the without sharing elevation pattern. The piece closes with eight concrete risks (compile-time dependencies that block uninstall, upgrade coupling, silent cascade failures, access invisible to admins) and six actionable recommendations for keeping cross-project coupling manageable.
08 July 2026