" Live as if you were to die tomorrow. Learn as if you were to live forever.. "
- Mahatma Gandhi

How To Check The Object Accessibility On Visualforce Page

Posted on November 24th, 2015 by Puja Bhandari

If a user has insufficient privileges to view an object, any Visualforce page that uses a controller to render that object will be inaccessible. To avoid this type error, we should ensure that our  Visualforce components will only render if a user has access to the object associated with the controller. You can check for […]

Create A Customer Portal User In Test Class

Posted on November 24th, 2015 by Puja Bhandari

Sometimes we need to create customer portal user in test class to run the functionality of customer user with  System.runAs() method. Here I’ll provide how we create customer portal user in test class with some basic points. First we need to understand which profile is assigned to the portal user. When we enabled customer portal […]

Apply Line Breaks In Help Text

Posted on November 24th, 2015 by Puja Bhandari

Salesforce provides a way to add help text in visual force page (same as standard) as:   <apex:pageblocksectionitem helpText=”write your help text”> <apex:outputText value=”Name”/> <apex:inputField value=”{!Account.Name}”/> </apex:pageblocksectionitem> But when you need to add new line character or line break inside this text e.g. You need to add muti line Help text defining the values of […]

How to fetch and display data from a custom object on VisualForce page in SalesForce.

Posted on November 23rd, 2015 by Smarjit Debata

As a beginner I face difficulties in SalesForce even when with simple problems like fetching data and displaying them on the VisualForce page. Now that I have some knowlede on it, I would like to share it. Let’s begin with how to fetch and display data from a custom object on VisualForce page. Code VisualForce […]

Display your custom VisualForce Page for standard New or Edit page of object from listview

Posted on November 23rd, 2015 by DEEPABALI BHATTACHARYA

Salesforce provides a list view with options for creating record,editing or deleting existing records for objects. For any object,at its list view clicking New will guide you to standard page for creating new record of that object. Same applies for Edit option also. But often we require our own visualforce page to show as New […]

Multiple Row Editing In Salesforce

Posted on November 23rd, 2015 by Asish Behera

There are different ways to edit record in pageblock table.The first one is select one record ,to which we want to edit and go to anather page by taking Id of that record and in that page edit it.After completing editing then click save buttom and finally returns to original page. By this concept we […]

Enabling Google Talk sidebar in Salesforce

Posted on November 23rd, 2015 by Smarjit Debata

Let’s see how we can enable the google talk sidebar component in Salesforce. Goto http://www.google.com/a to sign up your domain for google apps. Login to your salesforce account. Click on the user menu (Your name at top-right of the salesforce page.) > Setup > Administration Setup > Google Apps > Settings Click on “Edit” in the […]

DML Operation Salesforce Apex-A Trick To Avoid Problem Of DML At Constructor

Posted on November 23rd, 2015 by DEEPABALI BHATTACHARYA

DML operation is not allowed in the constructor of Apex class. Whenever we go for a DML operation in constructor it resticts us in Salesforce.Only DDL is allowed. So we may use some other route. Use JavaScript to invoke an action method on the controller, and have this action method carry out the DML operation. […]

Using AJAX Toolkit In Force.com Platform

Posted on November 23rd, 2015 by Smarjit Debata

Force.com platform provides a JavaScript API which provides features to work with sObjects using JavaScript without the help of Apex codes. Is it always necessary to write an apex class for every visualforce page we build ? Not really. Because we have an well built javascript API available in force.com platform I am sure this […]

Using AggregateResult In SalesForce

Posted on November 23rd, 2015 by Souvik Dutta

Retrieving aggregate results in Apex First we have to demonstrate the usual technique for retrieving aggregate results using SQL/MySQL. To retrieve number of employees with salary greater than 25000, we would use :   SELECT COUNT(id) as “Number of employees” FROM employees ; In Apex where SOQL query is used, we use any aggregate function like […]

Insert, update, delete data from salesforce org even if you dont have API access

Posted on November 23rd, 2015 by Puja Bhandari

Salesforce provides the “Data loader” which is a client application for the bulk import or export of data. Use it to insert, update, delete, or extract salesforce.com records. But there is a limitation of “API Enabled” permission i.e. it is neccesary for the user to select the “API Enabled” checkbox from their profile . But […]

Record Types In Apex According To The Current User’s Profile Availability

Posted on November 23rd, 2015 by Puja Bhandari

Record types allow you to offer different business processes, picklist values, and page layouts to different users.After creating record types for any object you need to set the availability of that record type into the user profile. Suppose you creates three record type of Account as ‘Borrower’,’Investor’ and ‘Dealer’. And set the availability according to […]