How to implement Visualforce Component with Attributes ?

A Developer wants to implement such functionality or code which is required in multiple visualforce pages. So instead of repeating  the same code again and again, we can create visualforce component. Then we can use visualforce component in every place where we need that particular piece of code. In other words, custom visualforce component allows…

How to implement dynamic bar charts using Visualforce Charting ?

Visualforce charting help developers to implement customized business charts based on the data sets created directly from SOQL queries, or by building the data set in Apex code. We can use any chart provided by Salesforce like bar, line, area, and pie charts commonly used in business graphics, as well as radar, gauge, and scatter charts for more specialized charting….

What is JavaScript Remoting in Salesforce?

JavaScript remoting (Js Remoting) is a way to call methods in Apex Classes directly from JavaScript. It allows you to perform tasks on the page without having to reload the entire page. There are several benifits for using Js remoting for apex controllers:- Java Script remoting does not store view state, and thus helps to minimize…

VF Email Templates in Salesforce – How to?

Salesforce provides email templates for sending an email from Salesforce to Contacts, User and Lead etc. There are three types of email templates: Text Template HTML Template. Custom (Without using Letterhead) Visualforce Template Let’s explore Visualforce email template and go over its use cases. Visualforce email template allows developer to access and show the relational data like…

How can we Insert, Update and Delete a record in a Visualforce Page ?

We can do simple Insert, Update and Delete in a Visualforce Page with out using any APEX code. If you want extend the standard methods, you will need to write an extension to the Standard Controller or create a Custom Controller. Simple INSERT, UPDATE, DELETE in Visualforce page: We can insert, update and delete records by  using…

How to query data using SOQL and display on a Visualfroce page using PageBlockTable ?

We can query data using SOQL and display on a Visualforce page. Let’s display Account and related Opportunities by passing id of an account in the URL. We will query all Opportunities related to the Account using SOQL in Apex, and display data on Visualforce page using PageBlockTable. Create a Visualforce page using following code: Visualforce Page: Name: {!Account.Name}…

How can we display Parent and Related Child records without SOQL on a Visualforce Page ?

We can display Parent and related Child records on a Visualforce Page without using any SOQL query. We can go 5 levels up from child to parent and 1 level down from parent to child. 5 Levels up Account.CreatedBy>CreatedBy>CreatedBy>CreatedBy>CreatedBy.CreatedBy.Name Account.CreatedBy CreatedBy CreatedBy CreatedBy CreatedBy.CreatedBy.Name ( CreatedBy.Name is field of fifth level) 1 level down Account>Contacts Let’s display Account…