Salesforce Query for Phone format
Don't use SOQL to find or query records using phone numbers. Instead, use SOSL. SOSL Example: FIND {7894561237} IN Phone FIELDS RETURNING Account( Name, Phone, Other_Phone__c ) Sample Apex Code: ....
Don't use SOQL to find or query records using phone numbers. Instead, use SOSL. SOSL Example: FIND {7894561237} IN Phone FIELDS RETURNING Account( Name, Phone, Other_Phone__c ) Sample Apex Code: ....
Sample Code: EmailMessage emailMessage = new EmailMessage(); emailMessage.status = '3'; // email was sent emailMessage.fromName = 'Test Name'; // from name emailMessage.subject = 'This is the Subject!'; // email subject ....
Using OrgLimit Class, we can check API Request Limit using Apex in Salesforce. DailyApiRequests in OrgLimit class holds the Salesforce 24 hours API Usage. Sample Code: to check Daily Usage Map < String, ....
Apex Class: public with sharing class PrintNotesController { @AuraEnabled( cacheable=true ) public static List < NoteWrapper > fetchNotes( String strRecordId ) { List < NoteWrapper > listNoteWrappers = new List ....
Sample Apex Class: public class EinsteinChatBotController { public class CaseOutput { @InvocableVariable( required=true ) public String sStatus; } public class CaseInput { @InvocableVariable( required=true ) public String sCaseNumber; } @InvocableMethod(label='Get ....
Use the below methods to close the quick action popup and refresh the page from custom Salesforce Lightning Component. $A.get("e.force:closeQuickAction").fire();$A.get('e.force:refreshView').fire(); Sample code: Lightning Aura Component: Component: <aura:component implements="force:hasRecordId,force:lightningQuickActionWithoutHeader" controller="Sample" > ....
Component HTML: <template> <lightning-card title = "Search Accounts" icon-name = "custom:custom63"> <div class = "slds-m-around_medium"> <lightning-input type = "search" onchange = {handleKeyChange} class = "slds-m-bottom_small" label = "Search" > </lightning-input> ....
To ensure that test methods always behave in a predictable way, any Salesforce Object Search Language (SOSL) query that is added to an Apex test method returns an empty set ....
Dom.XMLNode can be usedto parse XML string in Salesforce using Apex. Sample XML: <?xml version="1.0" encoding="UTF-8"?> <breakfast_menu> <food> <name>Belgian Waffles</name> <price>$5.95</price> <description>Two of our famous Belgian Waffles with plenty of ....
add( index, value ) can be used to add value to a specific array or list index using apex in Salesforce. Sample code: List < String > strList = new ....