How to check strings equal or not using apex in Salesforce?
1. equals() Returns true if they are same and not null. 2. equalsIgnoreCase() Returns true if they are same ignoring Case(Upper or Lower Case) and not null. Sample Code: String ....
1. equals() Returns true if they are same and not null. 2. equalsIgnoreCase() Returns true if they are same ignoring Case(Upper or Lower Case) and not null. Sample Code: String ....
Sample Code: Apex Class: public with sharing class AccountController { @AuraEnabled( cacheable = true ) public static AccountWrapper fetchAccounts() { AccountWrapper wrap = new ....
Sample Code: HTML: <template> <div class="slds-box slds-theme--default"> <div class="slds-text-color_inverse slds-text-heading_large" style="padding:0.5rem;background:#16325c"> Accounts </div> <table class="slds-table slds-table_cell-buffer slds-table_bordered slds-table_striped"> <thead> <tr class="slds-line-height_reset"> <th class="" scope="col"> <a class="slds-th__action slds-text-link_reset" href="javascript:void(0);" role="button" tabindex="0" ....
Use state attribute to pass query parameters or URL parameters in lightning navigation. Sample Code: Apex Class: public with sharing class AccountController { @AuraEnabled( cacheable = true ) ....
Sample Code: HTML: <template> <div class="slds-box slds-theme--default"> <table class="slds-table slds-table_cell-buffer slds-table_bordered slds-table_striped"> <thead> <tr class="slds-line-height_reset"> <th class="" scope="col"> Account Name </th> <th class="" scope="col"> Created Date </th> <th class="" scope="col"> ....
Sample Code: Apex Class: public with sharing class AccountController { @AuraEnabled( cacheable = true ) public static List< Account > fetchAccounts() { return [ SELECT Id, Name, Industry, AccountNumber, Rating, ....
Sample Code: global class createCaseInbound implements Messaging.InboundEmailHandler { global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email, Messaging.InboundEnvelope env) { Messaging.InboundEmailResult result = new Messaging.InboundEmailResult(); String myPlainText= ''; myPlainText = email.plainTextBody; try { Case objCase ....
Sample Code: HTML: <template> <lightning-card title = "Accounts" icon-name = "custom:custom63"> <div class = "slds-m-around_medium"> <template if:true = {accounts}> <div> <lightning-datatable key-field = "Id" data = {accounts} columns = {columns} ....
Note: 1. Pagination is done in client side(JavaScript). So, this is not the ideal solution for mass records. 2. Consider checking the page performance before using it in Production. 3. ....
Using Salesforce Lightning Web Component and Apex, we can fetch and display events between date time range. Following code implementation is used for the below use case. 1. Search the ....