Play Games

Search This Blog

Friday, December 31, 2021

Happy New Year 2022.Wish You more and more happiness and success to all my Viewers - Salesforce Globe For You

 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.



Wednesday, December 8, 2021

How to setup visualstudio code for Salesforce - Salesforce Globe For You

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

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.

Friday, December 3, 2021

How to show the static resource image in visualforce email template - Salesforce Globe For You

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

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: