How to Validate the Lead Record When Click the Convert Button in Salesforce

In Salesforce we can convert the leads based on Lead’s Field Value. To set up this we can use the below validation rules. In this example we used the custom field as “Lead Qualified” is equal to “Yes” Step 1 : Go to Setup Step 2 : Click Object Manager Step 3 : Select Lead…


How to Change Salesforce User Login Password Through Developer Console

In Salesforce we can reset the login password without resetting it. We can achieve this through developer console. Follow the below steps to change the password, Step 1 : Click user drop down option Step 2 : Select the Developer Console Step 3 : Click Debug option Step 4 : Open Execute Anonymous Window(Ctrl +…


How to Attach/Preview a PDF in Salesforce

Salesforce makes it extremely easy to generate PDF documents on the fly by simply using the renderAs=”pdf” attribute for the <apex:page> component. It’s also a snap to attach these PDFs to records as Attachments. Below is a small Visualforce page and Controller that generates a PDF and saves it to an Account. PDF Generator Visualforce…


What is an Email service in Salesforce

Email services are automated processes that use Apex classes to process the contents, headers, and attachments of inbound email. You can associate each email service with one or more Salesforce-generated email addresses to which users can send messages for processing. The general template to create the apex class for the email services is: global class…


How to Schedule Apex Class in Salesforce

Schedule Apex Jobs Use the Apex scheduler and the Schedulable interface if you have specific Apex classes that you want to run on a regular basis, or to run a batch Apex job using the Salesforce user interface. Salesforce schedules the class for execution at the specified time. Actual execution may be delayed based on service availability.…


How to Do the Deployment in Salesforce

To process Change Set deployment from a Sandbox to a production org, follow the instructions listed below In Sandbox 1.Log in to your sandbox. 2. Enter Outbound Change Sets. 3. Click New. 4. Enter the new Change Set and description, then click Save. 5. From the “Change Set Components” related list, click Add. 6. Add profiles to the Change…


What is the Purpose of Developer Console in Salesforce

What is Developer Console ?  The Developer Console is an integrated development environment (more typically called an IDE) where you can create, debug, and test apps in your org. It’s your one-stop solution for a variety of development tasks. Navigate, open, create, and edit Apex classes and triggers, Lightning components, and Visualforce pages and components.…


How to write SOSL Queries in Salesforce

Write SOSL Queries Salesforce Object Search Language (SOSL) is a Salesforce search language that is used to perform text searches in records. Use SOSL to search fields across multiple standard and custom object records in Salesforce. SOSL is similar to Apache Lucene. Adding SOSL queries to Apex is simple—you can embed SOSL queries directly in…


How to Write SOQL Queries in Salesforce

Write SOQL Queries To read a record from Salesforce, you need to write a query. Salesforce provides the Salesforce Object Query Language, or SOQL in short, that you can use to read saved records. SOQL is similar to the standard SQL language but is customized for the Lightning Platform. Because Apex has direct access to…


How to Install Eclipse and Delete Trigger using Eclipse In Salesforce

The Eclipse will the delete the trigger in the production or developer org or sandbox. To install Eclipse -> Go to Eclipse webpage and download the related eclipse file for your system and extract the zip file. Refer the eclipse link below. http://www.eclipse.org/downloads/packages/release/helios/sr1/eclipse-ide-java-developers Step 1: Install the Eclipse and Open the Eclipse. Select the workspace…


How to Add/Remove Rows Dynamically to a Table in Salesforce Visualforce Page

Step 1: Create New Visualforce Page. Page Name: NewProduct Apex Code: <apex:page standardController=”Customer__c” extensions=”NewProductController”> <apex:form > <apex:pageBlock > <apex:pageblockSection Title=”Customer” columns=”1″> <apex:outputField value=”{!customer.Name}”/> <apex:outputField value=”{!customer.Shipping_Address__c}”/> </apex:pageblockSection> <apex:pageBlockSection Title=”Product” columns=”1″ id=”p”> <apex:commandLink value=”Add Product” action=”{!addproduct}” reRender=”p”/> <apex:variable value=”{!0}” var=”proNum”/> <apex:pageBlockTable value=”{!product}” var=”pro”> <apex:column headerValue=”No.”> <apex:outputText value=”{0}” style=”text-align:center;”> <apex:param value=”{!proNum+1}”/> </apex:outputText> </apex:column> <apex:column headerValue=”Customer”> <apex:outputfield value=”{!pro.Customer__c}”/> </apex:column>…


How to Show Error Message in Trigger in Salesforce

Today, We are have created the post for explaining the below three topics. How to add custom error message in Apex Trigger How to query the related contact and checking  the values How check the old map and new map values.   Scenario is : When we change the Account type, we have to check the…


How to Get Fields Only from Different Object in a Given String

The below code is convenient to get list of fields come from different object. For example we have taken a String, which contains Objects Api name like that ObjA__c, ObjB__c, ObjC__c and Fields Api name like that Status__c, Date__c, Description__c. // Variable Declaration String allstr = ‘ ObjA__c.Status__c,ObjB__c.Date__c,ObjC__c.Description__c’; List<String> liststr=new List<String>(); //For Loop Start for(String str : allstr.split(‘\\,’)){…


How to Get Tree View Structure Using Visualforce Page

Here, I mentioned the sample tree structure for a user with a profile using jquery. This is very helpful for the learner in Fieldax&Field Service Management Salesforce. Visualforce code :- <apex:page sidebar=”false” controller=”TestTreeView”> <html> <head> </head> <body> <script src=”//cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js”></script> <link rel=”stylesheet” href=”//cdnjs.cloudflare.com/ajax/libs/jstree/3.3.3/themes/default/style.min.css” /> <script src=”//cdnjs.cloudflare.com/ajax/libs/jstree/3.3.3/jstree.min.js”></script> <div id=”container”> <ul> <li>User <apex:repeat value=”{!result}” var=”aa”> <ul><li>{!aa} <ul><li>{!result[aa]}</li></ul> </li> </ul>…


How to Get Geolocation Through Apex Class in Salesforce

We have given the solution for how to get Geo location value in the record. Geo location field is available now in Salesforce. Geo location field includes latitude and longitude values. The below example is shown whenever you update billing street, city, state, a country in account object, it will automatically update geolocation value in the…


How to Send Email Alert to User by Using Visualforce email Template in Salesforce

Sometimes you need to send email alert which should include related list details also. You can achieve this type of alert by using the visual force email type template in Fieldax&Field Service Management. The below example to explain visual force email template. For example, the Class Staff (Tutor) need to know the student information and…


Use of rendered, renderAs and reRerender in Salesforce

We explained rendered, reRender and renderAs attribute in the visualforce page. This article is effective to you can use visual force page. Rendered : – This attribute uses in all visual force components. It will return output depend on boolean value. The default value is true. The below code to check active account, show result…


How to Change Pagination View Dynamically Using Visualforce Page in Salesforce

This article is useful whenever you have an issue to split full page content. Pagination concept is a help to avoid this kind of issue. Pagination is nothing but some time the full page has long content so we could not able to view and had a bitterness to see. In that situation, this article is…


Dynamically Remove Table Column Based on Header Name in Salesforce

We provide you the solution for to remove some column values from a list of table rows and columns. How is it possible? We need to get column header name then you can remove. Try the below code :- <link rel=”stylesheet” href=”https://code.jquery.com/ui/1.11.4/themes/swanky-purse/jquery-ui.css”/> <script src=”//code.jquery.com/jquery-1.12.4.js”></script> <script src=”//code.jquery.com/ui/1.12.1/jquery-ui.js”></script> <form id=”pg”> </form> <script> $(‘<div id=”main” style=”float:left;width:20%;height:50%;”></div>’).appendTo(‘#pg’); $(‘<table id=”tbl”…


Updating Information on Contact After a Lead is Converted in Salesforce

In Salesforce, Lead is converted is a standard feature. This is an important one in business requirement. After a lead is qualified then it will be converted into account, contact, opportunity through Convert button. By default some information like that phone number, address are updated from the converted lead. Customer some times asked, they want…