HTMLENDCODE and JSENCODE in Salesforce Visualforce
HTMLENDCODE() method encodes the text and merge field values for use in HTML by replacing the characters that are reserved in HTML. JSENCODE() encodes the text and merge field values ....
HTMLENDCODE() method encodes the text and merge field values for use in HTML by replacing the characters that are reserved in HTML. JSENCODE() encodes the text and merge field values ....
Exception: { "error": "invalid_request", "error_description": "must use HTTP POST" } Resolution: We get this exception when the URL is incorrect with lightning domain URL instead of the Salesforce My Domain ....
RestContext.request.requestBody contains the Request Body in Salesforce REST API Apex Class. So, we can get the RestContext.request.requestBody to handle Request Body in Salesforce REST API Apex class. Sample Apex Code: ....
In Salesforce Lightning Experience, we can use "Rich Text" standard component on the Lightning Record Page to display or show error or warning message at the record level. Enable "Display ....
SheetJS Library can be used in the Salesforce Lightning Web Component to download the record in the Excel format. 1. Go to https://cdn.sheetjs.com/. 2. Select xlsx.full.min.js from the current version. ....
Check the following sample apex code which generates random 10 characters using EncodingUtil.base64Encode(), Crypto.generateAesKey(), replaceAll() and substring() methods. Sample Apex Code: String tempKey = EncodingUtil.base64Encode( Crypto.generateAesKey(256) ); tempKey = tempKey.replaceAll( ....
The following sample Apex code is only for Standard Channel. I have used MessageType as 'Text'. So, it is for SMS Channel. Sample Apex Code: /** * @description Test class ....
updateRecord from the 'lightning/uiRecordApi' library can be used to update records without using Apex in Salesforce Lightning Web Component. Sample Lightning Web Component: HTML: <template> <lightning-card icon-name="standard:case"> <p class="slds-p-horizontal_small"> <lightning-input ....
Exception: System.FinalException: Testing already stopped Resolution: Testing already stopped exception occurs when the Test Method in Salesforce apex has two Test.stopTest() method. To resolve this issue or exception, avoid using ....
contentType="application/vnd.ms-excel#AccountFile.xls" can be used to download the Visualforce Page in Excel Format. Sample Code: Apex Controller: public class AccountExcelFileController { public String xlsHeaderInfo { get { String strHeader = '<?xml ....