Mass Approval using Lightning Web Component in Salesforce
Sample code: Apex Class: public class MassApprovalController { @AuraEnabled( cacheable = true ) public static List < MassApprovalWrapper > fetchPendingApprovalRecords() { List < ....
Sample code: Apex Class: public class MassApprovalController { @AuraEnabled( cacheable = true ) public static List < MassApprovalWrapper > fetchPendingApprovalRecords() { List < ....
System.QueryException: unexpected token: '<EOF>' exception in Salesforce occurs due to Malformed Query String. If you are dynamically building the query, use System.debug() to print the query. Generated Debug log to ....
Page Block Table, Data Table, Data List and Apex Repeat can be used to render list in Visualforce page. Check the sample code for reference. Sample Code: Visualforce Page: <apex:page ....
To prevent users from updating Notes in Salesforce, develop a trigger on Note object and throw an error when someone tries to update the notes. Sample Trigger:trigger NoteTrigger on Note ( ....
Sample XML Code:<message><to>Magulan</to><from>InfallibleTechie</from><title>Welcome</title><body>Sample Message</body></message> XML Static Resource:Sample Apex Code:StaticResource objSR = [ SELECT ID, Body FROM StaticResource WHERE Name = 'Testing' LIMIT 1 ];String strResp = objSR.Body.toString();System.debug( ....
% cannot be used in Apex. But one should use Math.mod() instead.% is not a valid operator in Apex. So, use Math.mod() instead of % operator.Sample Code:Integer a = 10;Integer ....
To left align and set currency code in lightning datatable in Salesforce Lightning Web Component, use cellAttributes: { alignment: 'left' }. Please check the following sample code for reference. Sample ....
Sample Code: Apex Class: public with sharing class AccountController { @AuraEnabled public static String createAttachment( Id accountId ) { String result = 'Success'; try { Attachment a = new Attachment(); ....
Sample Code: Apex Class: public with sharing class AccountController { @AuraEnabled( cacheable = true ) public static List< Account > fetchAccounts( String searchKey ) { ....
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 ....