May 31, 2013

Difference between Database.query() and Database.getQueryLocator

We can retrieve up to 50,000 records.
We can retrieve up to 10,000 records.
If VF page doesn’t have read only attribute, use Database.query().
If VF page have read only attribute, use Database.getQueryLocator().
In Batch Apex, if we use Database.query(), it supports 50,000 records only.
In Batch Apex, if we use Database.getQueryLocator(), it supports upto 50 million records.


May 30, 2013

Sub Modules of CRM

A Typical CRM consists of 3 Sub Modules:

•        Marketing (Lead, Campaign, Account and Contact Management)

•        Sales (Account, Contact and Opportunity Management)

•        Services (Account, Contact, Cases and Solutions Management)


May 29, 2013

How to add Javascript to Standard Pagelayout in Salesforce?

To add Javascript to Standard Pagelayout in Salesforce, add a HTML Home page Component with HTML checkbox checked.

Sample Javascript:

<style type="text/css">
border: 2px solid black;

<script type="text/javascript" src="/soap/ajax/22.0/connection.js"></script>

<script src="" type="text/javascript"></script>

<script type="text/javascript">
    $(document).ready( function(){

            $("#popup").css( {position: "absolute", top:event.pageY - 110, left: event.pageX});
            var temp = $(this).prev(".dataCell").find("a").attr("href");
            var depLink = temp.substring(1);           
            var qryString = "SELECT Description__c FROM Dependent__c where Id = '" + depLink + "'";
            sforce.connection.sessionId = getCookie('sid');
            var soql = qryString.toString();
            var result = sforce.connection.query(soql);   
            var records = result.getArray("records");
            for (var i = 0; i < records.length; i++)
                var taskRecord = records[i];


        function showBox()
        function hideBox()
<div id="popup">
    <div id="cls">
    <a href="#" style="color:red;">X</a><br/>
    <div id="cont"></div>


CSS is not working

If applied CSS is not working, then try to avoid blank spaces in the CSS.

Good CSS:

border: 2px solid black;

Bad CSS:


    border: 2px solid black;


May 28, 2013

Tags in Salesforce

 Tags are words or short phrases that you can associate with most Salesforce records to describe and organize their data in a personalized way. Use tags to group records from various objects by a common topic or use, and then use those tags in search to make finding information fast and intuitive.

Types of tags:

    1. Personal tags are private. Only you can view any personal tags that you add to a record.
    2. Public tags are shared among all users in an organization. Any user with access to the record can view the public tags that you add.

Administrators can enable personal and public tags for accounts, activities, assets, campaigns, cases, contacts, contracts, dashboards, documents, events, leads, notes, opportunities, reports, solutions, tasks and for any custom objects.

In order to enable Tags, go to Setup --> Customize --> Tags --> Tag Settings.

For Public tags, kindly check Public Tags and for Personal Tags, kindly select Personal Tags.

 To add, tag to a record, kindly click "Add Tags" button.

Give a name to the tag and save it.

Search the tag name in the Search bar.



For all editions, a user is limited to a maximum of: 

• 500 unique personal tags
• 5,000 instances of personal tags applied to records

Across all users, your organization can have a maximum of:

• 1,000 unique public tags
• 50,000 instances of public tags applied to records
• 5,000,000 instances of personal and public tags applied to records


ADM 201 Book

May 17, 2013

How to add custom button to related list in Salesforce?

1. Create a List Custom button on child object.

2. Go the parent object.

3. Edit the page layout.

4. Go to related list.

5. Click 'Settings' icon.

6. Select the button to be displayed.

7. Click 'Save'.


May 15, 2013

How to create custom tab style in Salesforce?

1. Go to Documents tab.

2. Add a image less than 20kb in size.

3. Check "Externally Available Image" checkbox without fail.

 4. Go to App setu --> Create --> Tabs and click "New" button.

 5. Click the magnifying glass icon next to Tab style and click "Create your own style" button.

6. Select Color and icon from the image stored in Documents.

This dialog only lists files in document folders that are under 20 KB and have the Externally Available checkbox selected in the document property settings. If the document used for the icon is later deleted, Salesforce replaces it with a default multicolor block icon (Default Block Icon).


Freshers Drive

"Connecting Fresh Talent with Right Opportunity"

Freshers Drive on 18th May 2013

Who are eligible-
• B.E/B.Tech/M.Tech/M.E/MCA/M.Sc (IT/CS Branches ONLY)
• 70% minimum throughout the education (Compulsory)
• Only 2012 & 2013 Batch will be considered

Interview Date: 18-05-2013
Registration Timings: 8.00 AM to 9.00 AM
Interview Timings: 9.00 AM Onwards

Interview Procedure-
• Aptitude Test (1 hr)
• Essay Writing (1/2 hr)
• Group Discussion
• Personal Interview

Documents to be carried:
• Hard Copy of the profile
• One passport size photograph

Venue Details - HighRadius Technologies Pvt. Ltd.
Ektha Pearl, 4th Floor, 1st Lane, White Fields,
BP Raju Marg, Kondapur, Hyderabad-500084.

Salesforce Interview questions with answers Part 13

1. In Data loader using upsert operation can u do update a record if that record id is already exist in page and if updated that record then can u update 2records with having same id and if not updated 2 records then wat error message is given?

It is not possible to update records with same id in a file usin upsert operation. It will throw "duplicate ids found" error.

2. One product cost is 1000. It is stored in invoice so once if change the cost of product to 800 then how can i update it automatically into a invoice?

We can achieve this using triggers or through relationship among objects.

3. One company is having some branches and all branches having different departments. So, now I want to display all departments from all branches in a single visualforce page?

Using subquery we can fetch all the required data and we can display it in VF page.

Summer ‘13 Certification Maintenance

The Summer ‘13 product releases will occur on May 17, 2013, June 7, 2013 and June 14, 2013. As a certified professional, you will be responsible for completing the Summer ‘13 release exam(s) in order to maintain your certification credential(s).

The Release Training can also be accessed here:

To learn more about what’s new in the Summer ‘13 release, review the release notes:

Deadlines to Complete Release Exams:

·         Winter ‘13 exams must be completed by Friday, June 28, 2013 (applies to individuals certified in Summer ‘12 or earlier)
·         Spring ’13 exams must be completed by Friday, November 1, 2013 (applies to individuals certified in Winter ’13 or earlier)
·         Summer ‘13 exams must be completed by Friday, February 28, 2014 (applies to individuals certified in Spring ’13 or earlier)

May 14, 2013

Salesforce Interview questions with answers Part 12

1. Can you please give some information about Implicit and Explicit Invocation of apex?
Triggers - Implicit

Javascript remoting - Explicit

2. What is apex test execution?

Exectuing apex test classes

3. What is meant by email services in salesforce?

5. How can we know few time based workflows has been fired and some more are still need to fire?

6. In an apex invocation how many methods that we can write as future annotations?


7. How can we track which time based wf's are fired and which are in the queue?

How can we track which time based workflows are fired and which are in the queue?

To track which time based workflows are fired and which are in the queue, kindly go to Setup --> Monitoring  -> Time Based Workflow.

May 11, 2013

Advantages of Salesforce CRM

  1. Flexibility
  2. Disaster Recovery
  3. Automatic Software updates
  4. Increased Collaboration
  5. Work from anywhere
  6. Document Control
  7. Security
  8. Environmentally friendly

May 10, 2013

How to find object type from Salesforce record id?

Sample Code to execute in Developer Console:

  1. Id myId = '0035A00003MuvnuQAB';  
  2. String sObjName = myId.getSObjectType().getDescribe().getName();  
  3. system.debug('Object Name is ' + sObjName);  


( Or )

Sample Code:

Visualforce page:

  1. <apex:page Controller="sample" sidebar="false" >  
  3. <apex:form >  
  5.     <apex:pageblock id="pg" >  
  7.         <apex:pageblockSection >  
  9.             <apex:pageBlockSectionItem >Record Id</apex:pageBlockSectionItem>  
  10.             <apex:pageblockSectionItem ><apex:inputtext value="{!recId}" /></apex:pageblockSectionItem>  
  12.         </apex:pageblockSection>  
  14.         <apex:pageBlockButtons >  
  16.             <apex:commandButton value="Find" action="{!find}" reRender="pg"/>  
  18.         </apex:pageBlockButtons>  
  20.         <apex:outputText >The object type is : {!objType}</apex:outputText>  
  22.     </apex:pageblock>  
  24. </apex:form>     
  26. </apex:page>  

Apex: Controller:

  1. public with sharing class sample {  
  3.     public Id recId {get;set;}  
  4.     public String output {get;set;}  
  5.     public Schema.SObjectType objType {get;set;}  
  7.     public void find() {  
  9.         objType = recId.getSobjectType();  
  10.         System.debug('Object Type is ' + objType);  
  12.     }  
  14. }  



May 9, 2013


  1. Easy to use
  2. Easy to set up
  3. Click to customize
  4. No software hassles
  5. Security
  6. Ease of implementation
  7. Ease of administration
  8. Features
  9. Price
  10. Customer Support

What is is a cloud computing and social enterprise software-as-a-service (SaaS) provider based in San Francisco. It was founded in March 1999, in part by former Oracle executive Marc Benioff. Cloud computing is a general term for anything that involves delivering hosted services over the Internet. In the software-as-a-service cloud model, the vendor supplies the hardware infrastructure, the software product and interacts with the user through a front-end portal. is a web based CRM tool that helps us to maintain the relationship with the customers. is a good example for Cloud computing services. uses Multi tenant architecture.

Leaders in cloud computing systems for customer relationship management, CRM, sales, social, call centre, knowledge management software cloud computing. 


Visualforce Email Template with custom controller

Apex Controller:

public  class acctTemplt
    public Id accountId {get;set;}
    public List<Opportunity> getopptys()
        List<Opportunity> oppty;
        oppty = [SELECT Name, StageName FROM Opportunity WHERE Accountid =: accountId];
        return oppty;



<apex:component controller="acctTemplt" access="global">
    <apex:attribute name="AcctId" type="Id" description="Id of the account" assignTo="{!accountId}"/>
    <table border = "2" cellspacing = "5">
            <td>Opportunity Name</td>
            <td>Opportunity Stage</td>               
        <apex:repeat value="{!opptys}" var="o">

Visualforce Email template:

<messaging:emailTemplate subject="List of opportunity" recipientType="User" relatedToType="Account">
    <messaging:htmlEmailBody >
    Below is the list of opportunities for your account {!relatedTo.Name}.<br/><br/>
    <c:OpptyList AcctId="{!relatedTo.Id}" /><br/><br/>



Difference between created, created, and every time it’s edited and created, and any time it’s edited to subsequently meet criteria

Evaluate the rule criteria each time a record is created. If the rule criteria is met, run the rule. Ignore all updates to existing records.
With this option, the rule never runs more than once per record.

created, and every time it’s edited
Evaluate the rule criteria each time a record is created or updated. If the rule criteria is met, run the rule.
With this option, the rule repeatedly runs every time a record is edited, as long as the record meets the rule criteria.
Note: We cannot add time-dependent actions to the rule if you select this option.

created, and any time it’s edited to subsequently meet criteria
Evaluate the rule criteria each time a record is created or updated.
For a new record, run the rule if the rule criteria is met.
For an updated record, run the rule only if the record is changed from not meeting the rule criteria to meeting the rule criteria.
With this option, the rule can run multiple times per record, but it won’t run when the record edits are unrelated to the rule criteria.


If we want to trigger the workflow only when the record is created, we have to use “created”.

If we want to trigger the workflow whenever the record is created or edited even though it has currently met and triggered, we have to use “created, and every time it’s edited”.

If we want to trigger the workflow whenever the record is created or edited and previously it didn’t meet the criteria.

May 8, 2013

Simple Visualforce Email Template


<messaging:emailTemplate subject="Test" recipientType="User" relatedToType="Employee__c" >
<messaging:htmlEmailBody >
            <td>Hi {!relatedTo.Employee_Name__c},</td>
            <td>Welcome to Accord Info Matrix</td>


Link to download Apex Data Loader without login

Check in


1. Open the below URL

2. Under Data Loader : Download Current Version, click the small icon in the left side of the image to download the latest Apex Data Loader

May 7, 2013

Salesforce Interview questions with answers Part 11

1. I want to update 10 records ,can I use


2. In Page layouts I want to change the Order of the can you do that?

Edit the layout.

3. Profile?what is permission set?

4. What is after update and before update?

5. Every month 1st I need to insert a record in 1 object?how will you do that?

Schedule a class. Check the below for example

6. How many types of controllers are there?

3 types.

Custom Controller.
Standard Controller.

7. I want to use more than 1 object in visual force pages?which controller will you use?


8. I want new 1 button on the detail page of standard Object ?how can you do it?

Create a button in that object and assign it to the page layout.

9. What is trigger and bulk trigger ?

10. For which events will will support?

Insert and update.


Salesforce Interview questions with answers Part 10

1. Write a query for below.
I have 1 parent(account) and 1 child(contact),how will you get, from child and email from the account when Organization name in account is "CTS"?

SELECT Email, (SELECT F.Name, L.Name FROM Contacts) FROM Account WHERE Name = 'CTS'.

2. what are workflow actions?

Field Update
Email Alert
Outbound Message

3. What are outbound messages?what it will contain?

In outbound message contains end point URL.

4. What is External id?primary id?
External id is unique to external application.
Primay id is unique to internal organization.

5. Data loader?and which format it will support?

Data loader is a tool to manage bulk data. It will support .csv format of Excel.

6. How import wizard will not allow the duplicates?Using external id.

7. What are validation rules?

Used to maintain data format.

8. Recursive triggers?where you have used?

State and Country Picklists—Beta in Salesforce

State and country picklists allow users to select states and countries from predefined, standardized lists, instead of entering state and country data into text fields.

State and country picklists allow for faster and easier data entry. Reports, email templates, and list views are automatically updated and no need of Validation Rules and Triggers for data entry.

State and country picklists are available on certain standard objects.

In this beta release, you can access and use the new picklists in most places that state and country fields are available in Salesforce, including:
  •     Record edit and detail pages
  •     List views, reports, and dashboards
  •     Filters, functions, rules, and assignments
In this beta release, state and country picklists do not work with:
  •     Campaign Members
  •     Translation Workbench
  •     Salesforce to Salesforce
  •     Salesforce Touch or Salesforce Mobile
  •     Visual Workflow, packaging, or partner portals
  •     Custom indexes or outbound messages


Salesforce multitenant architecture

Multitenancy refers to a standard in software architecture where a single instance of the software runs on a server, serving multiple client organizations (tenants). A software application is designed to virtually partition its data and configuration, and each client association works with a customized virtual application instance. Multitenancy is the fundamental technology that clouds use to share IT resources cost-efficiently and securely.

Tenants share IT resources securely among multiple applications and tenants (businesses, organizations, etc.).

Tenants do not share data among other Tenants.

Data to a Tenant is found using the OrgID.

To prevent malicious or unintentional monopolization of shared, multitenant system resources, has an extensive set of governors and resource limits associated with code execution. For example, closely monitors the execution of a code script and limits how much CPU time it can use, how much memory it can consume, how many queries and DML statements it can execute, how many math calculations it can perform, how many outbound Web services calls it can make, and much more.  So, a tenant cannot perform an unlimited number of database operations.

For more info, view the below site


May 6, 2013

Salesforce Interview questions with answers Part 9

1.       Ajax Components in V.F?

apex:actionPoller, apex:actionFunction, apex:actionSupport, etc.

2.       Salesforce sites?

Used to show data from our organization for public view.

3.       Rendered and Re Rendered and Re Renderdas?

4.       Auto-response rules and Escalation rules(for which objects are mandatory)?

Case and Lead.

5.       Difference between REST and SOAP API'S?

Varies on records that can be handled.

6.       What is creating debug log for users?

Track code

7.       Diff SOQL and SOSL?

8.       What is Action support and Action pollar in V.F?

9.       Diff Mater-detail & Lookup?

10.   What is Dynamic Apex?

11.   How cases are created?

Email to Case and Web to Case

12.   How many events are there in Triggers?

13.   What is after undelete?

While retrieving from recycle bin

14.   Will supports --->Insert,,,Will Trigger.Delete supports --->Delete


15.   What is Inline visualforce page?

Having vf page in pagelayout.

16.   Diff between Profile and permission sets?

17.   Diff between role and profile?

18.   What are sharing rules?and how many types of sharings are there?

19.   JSON?

20.   Do you know about Portals?

21.   If is child is mandatory field in lookup and I m deleting Parent,will child get deleted?


22.   Junction object?when will we use?If we delete the junction object what will happen?

For many to many relationship.

23.   Diff between controller and Extension?

24.   What is Dynamic SOQL?

25.   Context Variables in Triggers?

26. and Trigger.old?

27.   Can we have V.F pages in page layout?