20 Tips For Salesforce Developers
20 Tips For Salesforce Developers
In this post we will talk about top 20 Tips for Salesforce Developers to keep in mind while
writing the code. Salesforce developers should aware about Salesforce governor limits while
writing the code. Here are some Concepts For Every New Salesforce Developer To Learn be
become a master in Salesforce.
Database.upsert(accountList);
Use this:
Use this:
List<Account> accList = [SELECT Description FROM Account ORDER BY CreatedDate DESC LIMIT 1];
String substringValue;
substringValue= accList[0].Description.toUpperCase().
Use this:
List<Account> accList = [SELECT Description FROM Account ORDER BY CreatedDate DESC LIMIT 1];
//some processing
}
Use this:
for(Account acc: [SELECT Name FROM Account WITH SECURITY_ENFORCED LIMIT 10]){
accountIds.add(acc.Id);
}
Use this:
Map<Id, Account> accountMap = new Map<Id, Account>([SELECT Name FROM Account WITH
SECURITY_ENFORCED LIMIT 10]);
10. Use a utility class for storing constant variables
Use a utility class for storing constant variables: Use a utility class for
storing all the constants related to your project. It can be considered as a
constant repository and enable us to reuse the constants across apex
classes.
@api recordId;
get customFieldValue(){
Use this:
import { LightningElement, api, wire } from 'lwc';
import { getRecord, getFieldValue } from 'lightning/uiRecordApi';
import CUSTOM_FIELD1 from '@salesforce/schema/Account.CustomField1__c';
@api recordId;
get customFieldValue(){