2. A future call cannot make another future call.
3. Future calls cannot be guaranteed to run in a certain order.
** For 2 and 3, Queueable interface is the alternative for this where we can chain the jobs.
4. The maximum number of future method invocations per a 24-hour period is 250,000 or the number of user licenses in your organization multiplied by 200, whichever is greater. This limit is for your entire org and is shared with all asynchronous Apex: Batch Apex, Queueable Apex, scheduled Apex, and future methods.
https://help.salesforce.com/s/articleView?id=000329529&type=1
In software engineering, a connection pool is a cache of database connections maintained so that the connections can be reused when future requests to the database are required. Connection pools are used to enhance the performance of executing commands on a database. Opening and maintaining a database connection for each user, especially requests made to a dynamic database-driven website application, is costly and wastes resources. In connection pooling, after a connection is created, it is placed in the pool and it is used again so that a new connection does not have to be established. If all the connections are being used, a new connection is made and is added to the pool. Connection pooling also cuts down on the amount of time a user must wait to establish a connection to the database.
Salesforce Access Token Expiry:
Under Session Policies, click the Timeout Value dropdown menu and select when access tokens expire for a user’s connected app session.
You can control how long a user’s session lasts by setting the timeout value for the connected app, user profile, or org’s session settings (in that order). If you don’t set a value or you select None (the default), Salesforce uses the timeout value in the user’s profile. If the user’s profile doesn’t specify a timeout value, Salesforce uses the timeout value in the org’s Session Settings. The current permissions for the connected app are also listed in the org’s Session Settings.
Reference Artilce:
https://help.salesforce.com/s/articleView?id=sf.connected_app_manage_session_policies.htm&type=5
b. Converting a master-detail relationship to a lookup for a custom object on the “detail” side, changes the organization-wide default for the object to public read/write.
d. A lookup relationship can’t be changed to a master-detail relationship if the organization-wide default of the child object access level in the relationship is Controlled by Parent.
e. Converting a lookup to a master-detail-relationship changes the organization-wide default to Controlled by Parent and the sharing model is updated to public read/write.
Reference article:
https://help.salesforce.com/s/articleView?id=sf.relationships_considerations.htm&type=5
Database.GetUpdatedResult r = Database.getUpdated(
‘Object API Name’,
StartDateTime,
EndDateTime
);
Sample Code:
Database.GetUpdatedResult r = Database.getUpdated(
‘Account’,
Datetime.now().addDays( -1 ),
Datetime.now()
);
System.debug( ‘Updated Records result is ‘ + r );
To get Ids:
Database.GetUpdatedResult r = Database.getUpdated(
‘Account’,
Datetime.now().addDays( -1 ),
Datetime.now()
);
System.debug( ‘Updated Accounts Ids are ‘ + r.getIds() );
and subdetail(parent and child) records inherit security settings and
permissions from the master(parent) record. You can’t set permissions on
the detail record independently.
a 24-hour period is 250,000 or the number of user licenses in your
organization multiplied by 200, whichever is greater.
Asynchronous Apex: Batch Apex, Queueable Apex, scheduled Apex, and future methods.
Sample Code to check the limit:
System.OrgLimit apiRequestsLimit = limitsMap.get( ‘DailyAsyncApexExecutions’ );
System.debug( ‘Limit Name: ‘ + apiRequestsLimit.getName() );
System.debug( ‘Usage Value: ‘ + apiRequestsLimit.getValue() );
System.debug( ‘Maximum Limit: ‘ + apiRequestsLimit.getLimit() );
1. Case Article(CaseArticle)
2. Opportunity Product(OpportunityLineItem)
3. Pricebook Entry(PriceBookEntry)
4. Opportunity Contact Role(OpportunityContactRole)
5. Account Contact Role(AccountContactRole)
6. Account Team(AccountTeamMember)
7. Case Team(CaseTeamMember)
8. Opportunity Team(OpportunityTeamMember)
Tree
Displays a nested tree.
A simple tree with several levels that you can expand and collapse.
Tree Grid
Displays a hierarchical view of data in a table.
A tree grid displays structured data in a table with expandable rows.
The Transaction Finalizers feature enables you to attach actions, using the System.Finalizer interface, to asynchronous Apex jobs that use the Queueable framework. A specific use case is to design recovery actions when a Queueable job fails.
Sample Use Cases:
1. Retry in FinalizerContext if the queueable job fails
2. Add error log record in FinalizerContext to report on failures
Sample Class:
public class SampleClass implements Finalizer, Queueable {
public void execute( QueueableContext ctx ) {
}
public void execute( FinalizerContext ctx ) {
String parentJobId = ” + ctx.getAsyncApexJobId();
if ( ctx.getResult() == ParentJobResult.SUCCESS) {
System.debug(‘Parent queueable job [‘ + parentJobId + ‘] completed successfully.’);
} else {
System.debug( ‘Parent queueable job [‘ + parentJobId + ‘] failed due to unhandled exception: ‘ + ctx.getException().getMessage() );
}
}
}
SFDX: Create Project:
This creates an empty project with just the folders.
To develop in non-scratch orgs and use Org Browser to retrieve source, use SFDX: Create Project.
SFDX: Create Project with Manifest
This creates a project with a folder called Manifest. The Manifest folder will have default Package.xml. The Package.xml will contain minimum metadata types for the developer to start working.
When you run SFDX: Create Project with Manifest command, a package.xml file is created. Add the various metadata types you want to retrieve to this file.