Friday, 13 November 2020

Salesforce Releases its Top Features Of Winter '21

Salesforce Release Winter'21

As a result of the three Salesforce updates every year; Administrators, Developers, and Consultants are getting a lot more features and resources to please their customers and consumers. At the moment, we are moving towards the release of Winter'21, which will add new looks and features to the organization. We get new Features related to Lightning Experience, Lightning Flow, Lightning Web Component, Apex, Communities, Pardot, Quip, Einstein Analytics, and APIs. Let’s dive into our top features of this release.


Scheduled List Email 

Now we can plan when to send a list email. Choose the right time and date to ensure the best time to receive emails. We determine which emails we would like to send — and on which days. By scheduling, we can build emails ahead of time and schedule when they're out. By planning all of our email choices ahead, we will make our marketing activities even more efficient. For example, schedule a list email to arrive on a working day. Previously, scheduling was only available for individual emails, not for list emails. 





Analyze the performance of the Lightning Page 

When it comes to growth, organizational performance is the ruler. If users experience sluggish performance or long page loading times when using Lightning Experience, they no longer need to worry. Find suggestions for a better performance of the record page based on an analysis of the page right inside the Lightning App Builder. Performance Analysis in the App Builder tests the fields, instances of the Relevant Lists component, and the metadata of the record page. By clicking the Analyze button, get an analysis of the page with suggestions for improving the page performance.




Display survey pages that are focused on your data 


With each update, Salesforce Surveys seem to be getting more and more strong. Now, we can use our data in Salesforce org to decide which survey page the user will see next. Users will move to the relevant page on the basis of the answer. We can use the variables to specify the conditions in Page branching logic. Now the user will experience a new journey. 



Choose the Position of your utility bar


The utility bar gives easy access to common productivity tools, such as Notes and Recent items. Now, we can choose the position of our Salesforce org utility bar. Customize where our utility bar appears. We may move the utility bar to the bottom right or to the bottom left of the screen. 



Trigger a flow before the record is deleted 


Previously, we always need a trigger to add any validation or functionality before a record is deleted. We don't need to write an Apex code anymore. We can now use a flow to run before the record is deleted. This auto launched flow will execute in the background and update relevant records when a record is deleted. 





Use Safe Navigation Operator to Remove NullPointerException 


Winter'21 is bringing us a new safe navigation operator (?.). We can use the safe navigation operator (?.) to remove the consecutive condition that checks for null references. We may prevent  NullPointerException with the aid of this new operator. This operator handles expressions that try to run on a null value and returns null instead of raising a NullPointerException. The right-hand side evaluates only if the left-hand side is not evaluated to null. In the variable as well as in the function, we can use a safe navigation operator. 


This expression will first test x and return null if x is null. Otherwise, the return value will be x.y



// code checking for nulls 
x?.y // test to: x == null? Null : x.y 

This example demonstrates a SOQL query using a safe navigation operator. 

ContactRec = [SELECT FirstName FROM Contact WHERE Id = :contactId]; 
if (ContactRec.size() == 0)  // Contact was deleted
{     
    return null;
} 
return ContactRec[0].FirstName; 

//New Code 
return [SELECT FirstName FROM Contact WHERE Id = : contactId]?.FirstName; 


Enhance Apex Testing with New SObject Error Methods 


New Release gives us new SObject Error methods that minimize our efforts. Previously, we needed to perform DML operations to check the result for errors. Now we can monitor errors with the new  SObject.hasErrors() method and SObject.getErrors() method without running a DML operation. Use  SObject.addError() method to add errors to the specific fields. The hasErrors() method checks if an instance of SObject contains errors. We can get a list of errors for a specific instance of SObject using the getErrors() method. 


The following example will help you to understand:

//Base code sample for use with addError, getErrors

Contact con = new Contact();    

String message = 'New error in SObject';

con.addError('FirstName', message);  //New overload that dynamically embraces the field at runtime   

List<Database.Error> errors = con.getErrors();     

System.debug( errors.size());  //print 1 in debug 

Database.Error error = errors.get(0);    

System.debug(error.getStatusCode()); //print FIELD_CUSTOM_VALIDATION_EXCEPTION in debug 

String[] fields = error.getFields();   

System.debug(fields);   // print FirstName in debug 

System.debug(fields.size()); // print 1 in debug 


So in Salesforce Winter 21 update, we've got some fantastic features. Here you can read the full Salesforce Winter'21 Release Notes. 

If you have any questions you can reach out our Salesforce Consulting team here.

No comments:

Post a comment