Polymorphic Field in SOQL Queries in Salesforce
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: ....
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 = ....
Sample code: Apex Class: public class QueueAssignmentController { @AuraEnabled( cacheable=true ) public static QueueWrapper fetchQueueAssignments() { QueueWrapper objQW = new QueueWrapper(); Set < String ....
Note: I have used Google reCAPTCHA v2 Checkbox in the below implementation. 1. Navigate https://www.google.com/recaptcha. 2. Click on the "V3 Admin console" button. 3. Click the ‘+’ create icon. 4. ....
Sample Code: @RestResource(urlMapping='/AccountRESTAPI/*') global class AccountRESTAPIController { @HttpGet global static Account fetchAccount() { Account objAccount = new Account(); RestRequest req = RestContext.request; String accNum = req.params.get( 'accNum' ); return [ ....
Sample CSV File: Sample code: Apex: public with sharing class FileUploadController { @AuraEnabled public static String loadData( Id contentDocumentId ) { String ....
Sample code: DescribeSObjectResult objDescribe = SObjectType.Employee__c; system.debug( 'Label is ' + objDescribe.getLabel() ); Output:
1. You can add up to 50 jobs to the queue with System.enqueueJob in a single transaction. 2. When chaining jobs with System.enqueueJob, you can add only one job from ....
getAll() method can be used. 1. Create a Custom Metadata Type. 2. Create few records. Sample Code: Map < String, Test__mdt > mapCustomMetadataType = Test__mdt.getAll(); for ( String strKey : mapCustomMetadataType.keySet() ....