Hello Viewers,
At first I would like to say ' Thank You ' for all your support so far.
I wish each and everyone one a very happy new year.Good Luck.
A blog containing Salesforce coding examples in detail.It's a place where you can find solutions to the problems that you may face in your daily salesforce coding. Apex classes,visual force page,we services,Integration,plugins,extensions,Lightning web components,Aura components,Email Messages,Sales cloud,service Cloud,Marketing Cloud.Lightning Web components,salesforce.com, Salesforce Tips and Tricks,short cuts,ApexMocks,Stubs, visibility,Salesforce Shorts
Hello Viewers,
At first I would like to say ' Thank You ' for all your support so far.
I wish each and everyone one a very happy new year.Good Luck.
How to setup visualstudio code for Salesforce - Salesforce Globe For You
Solution:
Step 1: Install visualstudio code by navigating to the URL https://code.visualstudio.com/ and based on your system that you are using
download the vs code and install it.
Step 2: Install Salesforce CLI by navigating to the URL https://developer.salesforce.com/tools/sfdxcli and based on your system that you are using download and install it.
To confirm if salesforce cli is installed or not,go to command prompt and type sfdx.
if the command shows the version,usage and topics etc it means its successfully installed.
In case if you didn't get the above,it means Path is missing.You need to check environmental variables and make sure sfdx installation path(till bin folder) is added to path variable.
Step 4: Adding Salesforce Extension Pack
Go to vs code and click on extensions icon and Search Salesforce Extensions Pack and install it.
That's it,the vs code is ready to use.
Note: Make sure java is installed and path is set correctly.
Java runtime could not be located in visual studio code Salesforce - Salesforce Globe For You
Solution: This error generally occurs in case if java is not installed or java path is not set correctly.
Step 1: Go to the folder where java is installed and copy the url till bin folder as shown below
C:\Program Files\Java\jdk-17.0.1\bin
Step 2: Open the vs code
Go to File--> Preferences --> Settings
Search with Java home and you will get the screen as shown below
Set the java:home path by coping the url as shown in the image below
That's it.The issue gets resolved.
How to show the static resource image in visualforce email template - Salesforce Globe For You
Solution: Use <apex:image url="{!$Resource.staticresourcename}" width="50" height="50"/> to display image
Example:
<messaging:emailTemplate subject="Visualforce Email Template Demo" recipientType="User" relatedToType="Account">
<messaging:htmlEmailBody >
<html>
<body>
<div>
<apex:image url="{!$Resource.TestLogo}" width="50" height="50"/>
</div>
</body>
</html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>
Output:
How to show today's date in visualforce email template - Salesforce Globe For You
Solution: Use {!TODAY()} to display today's date in visualforce email template.
Example:
Visualforce Email Template Code
<messaging:emailTemplate subject="Visualforce Email Template Demo" recipientType="User" relatedToType="Account">
<messaging:plainTextEmailBody >
Today Date : {!TODAY()}
Today Date(DD/MM/YYYY) : <apex:outputText value="{0,date, dd/MM/YYYY}">
<apex:param value="{!TODAY()}" />
</apex:outputText>
</messaging:plainTextEmailBody>
</messaging:emailTemplate>
Output: