Queueable Interface Syntax in Salesforce
Syntax: public class ClassName implements Queueable { //constructor public ClassName() { } public void execute( QueueableContext qc ) { } } To execute: System.enqueueJob( new ClassName() );
Syntax: public class ClassName implements Queueable { //constructor public ClassName() { } public void execute( QueueableContext qc ) { } } To execute: System.enqueueJob( new ClassName() );
Syntax for Future method: public class className { @future public static void methodName() { } } Syntax for Future method with callout: public class className { @future(callout=true) public static void ....
To Setup Inbound Email Service, check the following link https://www.infallibletechie.com/2012/12/inbound-email-creating-record-using.html Sample Apex Class: Apex Class: global class OrderCreation implements Messaging.InboundEmailHandler { global Messaging.InboundEmailResult handleInboundEmail( Messaging.InboundEmail email, Messaging.InboundEnvelope env ) { ....
Apex Class: public class DynamicRowsController { @AuraEnabled public static String updateAccts( List < Account > listAccts ) { try { ....
Sample Code: Apex Class: public class SampleAuraController { @AuraEnabled public static List < Account > fetchAccts() { return [ SELECT Id, Name, Industry, Is_Active__c FROM Account LIMIT 10 ]; } ....
Sample Code: Apex Class: public class AccountListController { @AuraEnabled public static List < Account > fetchAccts() { return [ SELECT Id, Name, Industry, Type, ....
Sample Code: Apex Class: public with sharing class ExistingFilesController { @AuraEnabled( cacheable = true ) public static List < ContentDocument > fetchContentDocuments( String strRecordId ) { List ....
instanceof can be used to find the object type in Salesforce Apex. TYPEOF can be used to find the object type in Salesforce SOQL. For Task Object with What field: ....
1. Lightning Web Component is HTML: <template> Selected industries are <template for:each={Industries} for:item="ind"> <p key={ind}>{ind}</p> </template> </template> JavaScript: import { LightningElement, api } from 'lwc'; export default class TestFlowComponent extends ....
Apex Class: public with sharing class PublicGroupOrQueueAssignmentController { @AuraEnabled( cacheable=false ) public static UserWrapper fetchGroupAssignments( String strGroupId ) { UserWrapper objUW = new UserWrapper(); Set < String > setAssignedUserIds = ....