Showing posts with label Salesforce Interview Questions. Show all posts
Showing posts with label Salesforce Interview Questions. Show all posts

Friday, December 11, 2015

Salesforce Interview Questions for Deloitte

Salesforce Interview Questions for Deloitte
 

For which criteria in workflow “time dependent workflow action” cannot be created?
What is the advantage of using custom settings?
What are the different workflow actions available in workflows?
What is whoid and whatid in activities?
What is the difference between a standard controller and custom controller
What are governer limits ?
Soql injection?
Difference between import wizard vs dataloader?
what is the difference between 15 and 18 Digit ID ?
What is dynamic pick list?
Difference between data-table vs page block table?
How can we implement pagination in visualforce ?
What is a externalid in salesforce
How can you call a controller method from java script ?
How can you refresh a particular section of a  visualforce page?
What is the difference between Custom Setting and Custom Labels?
What is the Difference between Managed Package and Unmanaged package?
How do we capture the user Data in VisualForce page?
What are the different Annotations in Salesforce?
What is a difference between System log and debug log?
How to undeployed deployed things?
What is render, rerendre,renderas ?
Difference b/w isblank/is null?
Why do we Use  system assert in Test Class?
how can we prevent to cross the governor limit from soql query ?
What is the difference between Sales Cloud and Service Cloud ?
What is the stages of Opportunity?
What is a Batch Apex ?
What are the different methods in test Class?
What are the different ways to make a field Mandatory?
What are the different ways to share a record?
What is the difference between Salesforce license and Force.com License ?
Can we create a new User without Role and Profile?
What are the difference between Render as and Re-render?
Why do we use List and Set? give an example for it?

Monday, January 27, 2014

How to get the Recordtype Id using Dynamic Apex

How to get the Recordtype Id using Dynamic Apex

Normally to get the RecordtypeId for any sObject we use SOQL and it will count against your limit. So below method will bypass the need of SOQL Query.
Map<String, Schema.SObjectType> m  = Schema.getGlobalDescribe() ;
Schema.SObjectType s = m.get('API_Name_Of_SObject') ;
Schema.DescribeSObjectResult cfrSchema = s.getDescribe() ;
Map<String,Schema.RecordTypeInfo> RecordTypeInfo = cfrSchema.getRecordTypeInfosByName();

Id rtId = RecordTypeInfo.get('Record Type Name').getRecordTypeId();

How to write the “Where” clause in SOQL when GroupBy is used for aggregate functions

How to write the “Where” clause in SOQL when GroupBy is used for aggregate functions

We cannot use the “Where” clause with GroupBy for aggregate functions like SUM() instead we will need to use the “Having Clause“.
Example : Get all the opportunity where more than one record exists with same name and name contains “ABC”.
SELECT COUNT(Id) , Name FROM Opportunity GROUP BY Name  Having COUNT(Id) > 1 AND Name like '%ABC%'
Read more about Having clause


Explain difference in COUNT() and COUNT(fieldname) in SOQL.

Explain difference in COUNT() and COUNT(fieldname) in SOQL.

COUNT()
COUNT() must be the only element in the SELECT list.
You can use COUNT() with a LIMIT clause.
You can’t use COUNT() with an ORDER BY clause. Use COUNT(fieldName) instead.
You can’t use COUNT() with a GROUP BY clause for API version 19.0 and later. Use COUNT(fieldName) instead.

COUNT(fieldName)
You can use COUNT(fieldName) with an ORDER BY clause.
You can use COUNT(fieldName) with a GROUP BY clause for API version 19.0 and later.
Read here in more detail about COUNT() and COUNT(fieldname)

You want to display the Encrypted field on Visualforce and you are using component apex:outputText. Will it work for Encrypted fields

You want to display the Encrypted field on Visualforce and you are using component apex:outputText. Will it work for Encrypted fields

Encrypted custom fields that are embedded in the <apex:outputText> component display in clear text. The <apex:outputText> component doesn’t respect the View Encrypted Data permission for users. To prevent showing sensitive information to unauthorized users, use the <apex:outputField> tag instead.


How to display the formatted number / date in Visualforce ? Which component should be used

How to display the formatted number / date in Visualforce ? Which component should be used

Use component “<apex:outputText>”.
Example : Format the number into currency.
<apex:outputtext value="{0, number, 000,000.00}">
   <apex:param value="{!valFromController}" />
</apex:outputtext>
OR
<apex:outputtext value="{0, number, ###,###.00}">
   <apex:param value="{!valFromController}" />
</apex:outputtext>
Read in Detail , here

Format                                   Input                                                    Output
{0, date, short}                     Sun Dec 15 07:00:11 GMT 2013      12/15/13
{0, date, medium}               Sun Dec 15 07:00:11 GMT 2013      Dec 15, 2013
{0, date, long}                       Sun Dec 15 07:00:11 GMT 2013      December 15, 2013
{0, date, full}                        Sun Dec 15 07:00:11 GMT 2013      Sunday, December 15, 2013
{0, date, yyyy-mm-dd hh:mm:ss a} Sun Dec 15 07:00:11 GMT 2013      2013-Dec-15 07:00:11 AM GMT
{0, number, integer}           123.456                                                 123
{0, number, currency}        123.456                                                 $123.46
{0, number, percent}          0.5                                                          50%
{0, number, 0000.0}           123.456                                                0123.5
{0, number, ####.#}          123.456                                                123.5
{0, number, 0.0000}           123.456                                                123.4560
{0, number, #.####}          123.456                                                123.456


If IE9 is not working with your custom visualforce page then how to tell your visualforce code to run in IE8 compatibility mode

If IE9 is not working with your custom visualforce page then how to tell your visualforce code to run in IE8 compatibility mode

Add following metatag to pages:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />


Onchange event does not work with in IE9. How to resolve this error

Onchange event does not work with <apex:actionsupport> in IE9. How to resolve this error

If we hide the Header on Visualforce page then it creates lots of problem in IE9. I think there are few java-script library loaded by Header of Salesforce which makes IE9 compatible. So the best solution is to enable the Headre by using “showHeader=true” in Apex page.

How to add the Document Header in Visualforce page

How to add the Document Header in Visualforce page

Directly there is no way to add the document type in visualforce. However in most of the cases IE9 does not work with Visualforce pleasantly. And then we need to add the Document type in header. So following workaround will work.
<apex:outputText
escape="false"
value="{!'<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">'}"/>
<html>
    <head>
        <title>test</title>
    </head>
    <body>test</body>
</html>
</apex:page>

Read more in detail in thread – http://boards.developerforce.com/t5/Visualforce-Development/Changing-doctype-of-a-Visualforce-Page/td-p/82397/page/2


What is features of “Manage Members” in campaign records

What is features of “Manage Members” in campaign records

Campaign members are created from lead, contact, or person account records. Salesforce provides a variety of ways in which you can manage your campaign members. You can add and update up to 50,000 campaign members at a time through lead, contact, and person account reports; you can search for and add or edit multiple leads and contacts from the Manage Members page; you can add an unlimited number of leads and contacts using a CSV import file; or you can add members to a campaign one at a time from contact or lead detail pages.

Read More:

What is difference between Mobile Lite and Salesforce Mobile

What is difference between Mobile Lite and Salesforce Mobile


FEATURE
MOBILE LITE
SALESFORCE MOBILE
Edit capabilities  All standard objects            Any app, any record
Customizations   Supports custom fields      Any - includes custom fields, objects, tabs, configurations
Records Most recently used records; search only       All records
Objects  Leads, accounts, contacts, opportunities, tasks, events, cases, solutions, assets, and dashboards All objects
Custom objects    None      Any
Initial set of records           Recently viewed on Web   Fully configurable
Download additional records          Using live search Using live search
Security Secured data access and over-the-air management     Secured data access and over-the-air management
Price       Free for all editions of Salesforce    Free for Unlimited Edition customers; available in Professional Edition and Enterprise Edition for a fee
Difference between Mobile lite and Salesforce Mobile

Mobile Lite is a free, restricted version of Salesforce Mobile that is available to any Salesforce user who doesn't have a mobile license.

Mobile lite is not supported by the customer portal and partner portal.

More read at - http://www.salesforce.com/mobile/apps/salesforcemobile/comparison/


How to show loading image while Ajax call in Visualforce? OR how to show image in tag in Visualforce

How to show loading image while Ajax call in Visualforce? OR how to show image in <apex:actionStatus> tag in Visualforce

<div style="position:absolute;top:20px;left: 50%;">
            <apex:actionStatus id="refreshContent" >
               <apex:facet name="start" >
                <apex:image url="{!$Resource.LoadingImage}" />
               </apex:facet>
             </apex:actionStatus>
         </div>

<apex:actionStatus startText=" (incrementing...)" stopText=" (done)" id="counterStatus" />


How to increase timeout while calling web service from Apex

How to increase timeout while calling web service from Apex

docSample.DocSamplePort stub = new docSample.DocSamplePort();
stub.timeout_x = 2000; // timeout in milliseconds

External Email Address Limitation for Mass Email in Salesforce:
Below is the maximum number of external email addresses you can include in each mass email depends on your salesforce edition:
Edition                                                                                  External Address Limit per Mass Email
Personal, Contact Manager, and Group Editions          Mass email not available
Professional Edition                                                            250
Enterprise Edition                                                                500
Unlimited Edition                                                                1,000
Developer Edition                                                                10


A single Apex transaction can make how many callouts to an HTTP request or an API call

A single Apex transaction can make how many callouts to an HTTP request or an API call

Maximum 10 callouts 

Who can access “drag and drop dashboard”

Who can access “drag and drop dashboard”

User with permission “manage dashboard”.


Which permission is required to set the running user other than you in dashboard

Which permission is required to set the running user other than you in dashboard

“View All Data” in profile.

How to enable “floating report header”

How to enable “floating report header”

Go to “Setup | App Setup | Customize | Report and Dashboard | User Interface Settings “.
Click on checkbox “Enable Floating Report Headers”. 

Thursday, January 23, 2014

In case of Master-Detail relationship, on Update of child record can we update the field of Parent record using workflow rule

In case of Master-Detail relationship, on Update of child record can we update the field of Parent record using workflow rule

Yes, the Master fields are also available for “Criteria evaluation”

What is Mandatory while creating User, Role or Profile

What is Mandatory while creating User, Role or Profile

Its Profile

If i want record level access then what should i use from Salesforce security model

If i want record level access then what should i use from Salesforce security model

Manual Sharing –> there will be sharing button in the record near by edit, cancel etc

The Sharing button is available when your sharing model is either Private or Public Read Only for a type of record or related record. For example, the Sharing button may appear on an account even though your sharing model for accounts is Public Read/Write if your sharing model for related opportunities is Public Read Only.