What is the use of apex:message?
A message for a specific component, such as a warning or error. If an <apex:message> or <apex:messages> component is not included in a page, most warning and error messages are ....
A message for a specific component, such as a warning or error. If an <apex:message> or <apex:messages> component is not included in a page, most warning and error messages are ....
Test.getStandardPricebookId() is used to get or fetch the Standard Price Book Id in the Apex test class. Sample Code: Id pricebookId = Test.getStandardPricebookId(); Sample Apex Test Class: @isTest private class ....
URL.getOrgDomainUrl() can be used in Salesforce Apex to get the base or domain URL. Sample Code: System.debug( 'Base or Domain URL is ' + URL.getOrgDomainUrl() ); Use the following method ....
{!$Site.BaseUrl} is used to get base url in Visualforce. Sample Code: Visualforce Page: <apex:page controller="SampleVisualforcePageController" sidebar="false"> <apex:repeat value="{!listAccounts}" var="acc"> <a href="{!$Site.BaseUrl}/{!acc.Id}" target="_blank"> {!acc.Name} </a> <br/> </apex:repeat> </apex:page> Apex Controller: public class ....
Queueable Apex is similar to future methods, but provide additional job chaining and allow more complex data types to be used. Queueable Apex allows you to submit jobs for asynchronous ....
When you face System.QueryException: unexpected token: 's' issue, use String.escapeSingleQuotes() method to avoid this exception. Sample SOQL: String SOQL = 'SELECT Id, Name, ( SELECT Id, Name FROM ....
getSobjectType() can be used to get Object Name from the Id value using Salesforce Apex. So, we can get the object name using record id. Check the following code for ....
To call Future methods from Process Builder, call the future method from the in-vocable method. Check the below code for reference. Sample Code: public class LightningProcessBuilder { @InvocableMethod public static ....
Create an Email Template. Note down the Email Template Id. Create a Contact record with the Name "Do Not Delete". Use the dummy Do Not Delete Contact Id in the ....
ConnectApi.MentionSegment in Salesforce Apex can be used to find @mentioned user from Feed Item. Sample Feed Item: Sample Code: String communityId = null; for ( FeedItem objFI : [ SELECT Id ....