Header Ads Widget

LATEST DELOITTE INTERVIEW QUESTIONS AND ANSWERS MARCH 2108

Deloitte
Based in New York, NY, Deloitte has earned a spot on the Working Mother 100 Best Companies list. It has also earned a spot on the NAFE Top Companies for Executive Women list and the Best Companies for Multicultural Women list.

DELOITTE LATEST INTERVIEW QUESTIONS AND ANSEWERS
Q1. Why users can't be deleted from salesforce.com?

Ans: In order to maintain data integrity in salesforce and historical records of who did what and when, and to support audit process, the Users are not allowed to delete in salesforce but can be deactivated.

Q2. When to use BEFORE triggers and when to use AFTER triggers?

Ans: BEFORE triggers should be used in below scenarios
Custom validation checks in the same object
Update the same record/object
Setting a default values
     AFTER triggers should be used in below scenarios
If we need to use Record's ID
Inserting or Updating the related records
To send notification email post commit
Q3. What are setup and non-setup objects in Salesforce?

Ans:Setup objects are objects responsible for interacting with metadata for declarative development.
All other objects are called as non setup objects.

Q4. In which circumstances the triggers are needed?

Ans: Triggers are needed when the data need to insert/update on multiple objects in a single transactions Or when we are inserting default values to database Etc.,

Q5. What are inner classes in Salesforce?

Ans: Inner Classes are classes defined within another class. We can only have inner classes 1 level deep. We don't have to use an access modifier in the declaration of an inner class since the default value is a private.

Q6. What are the different ways the deployment can be done in salesforce?

Ans:
Force.com migration tool
Eclipse IDE
Change Set
Q7. Why 1% coverage is mandatory for triggers in salesforce?

Ans: This is to make sure that the triggers written will be executed in the production environment and will not become unreachable code and trigger actions are called when appropriate actions are done.

Q8. Can we call Batch Class inside another Batch Class?

Ans: Batch Class can be called from another Batch Class

Q9. Can we call Future method inside Batch Class?

Ans: Due to the salesforce limitation, we can't call a future method from inside a batch job.

Q10. Is it possible to have more than one controller on Visualforce page?

Ans: Only one controller is allowed per Visualforce page, but there can be more than one extensions class.

Q11. What are the different bindings used in Visualforce page?

Ans: There are 3 types of bindings available.
 1. Data Binding - Refers to data set in controller.
 2. Action Binding - Refers to action methods in controller.
 3. Component Binding - Refers to other Visualforce components

Q12. Which objects have associated Standard Controllers?

Ans: All Standard and Custom objects have associated Standard Controllers.

Q13. What is the difference between Force.com and Salesforce.com?

Ans: Force.com is a cloud computing platform where the developers build multi-tenant applications.
Salesforce.com is a cloud computing platform, it contains only standard objects. Salesforce.com is hosted on force.com platform.

Q14. What are the different types of sandboxes?

Ans: There are 3 types of sandboxes.
 1. Configuration Only Sandbox
 2. Developer Sandbox
 3. Full copy Sandbox

Q15. What are the different Salesforce.com editions?

Ans: Below are the different Salesforce editions
 1. Personal Edition
 2. Contact Manager Edition
 3. Group Edition
 4. Professional Edition
 5. Enterprise Edition
 6. Unlimited and Performance Edition
 7. Developer Edition

Q16. Can we create new Profile without cloning Existing Profile?

Ans: No, We have to clone any one of the existing Profiles to create a new Profile.

Q17. What are different types of Accounts in salesforce?

Ans: There are 2 types of Accounts in Salesforce.
 1. Personal Accounts -
    Associated with a single person and Person name will be taken as     primary consideration
 2. Business Accounts -
    Company name will be taken into primary consideration

Q18. Do governor limits apply to Sandbox Instances?

Ans: Governor limits do apply to all Salesforce Instances.

Q19. When you can't add Time dependent action in Workflow rule?

Ans: We can't add a time dependent action to a rule if we choose an option of Every time a record is created or edited.

Q20. What are the different types of Email Templates available in salesforce?

Ans: There are 4 types of Email Templates available in Salesforce.
 1. Text
 2. HTML with Letterhead
 3. Custom HTML
 4. Visualforce Templates

Q21. What are Roll up Summary fields in Salesforce?

Ans: Roll up summary fields in Salesforce calcultes SUM, MIN, MAX, COUNT of particular field of any child record. Roll up summary fields can be created only on parent object of a master detail relationship.

Q22. What will happen if Account is deleted?

Ans: If the Account is deleted, then the Contact and Opportunity will also be deleted from Salesforce which are related to that Account.

Q23. How many types of Relationships available in Salesforce?

Ans: There are 5 types on Relationship available in Salesforcce.
 1. Master Detail Relationship
 2. Many to Many Relationship
 3. Lookup Relationship
 4. Hierarchical Relationship (It is available only on User Object)
 5. Self Relationship

Q24. How to create Many-To-Many Relationship in Salesforce?

Ans: Many-To-Many Relationship is also called Junction object in Salesforce. It can be created with below steps.
 1. Create Both Objects which should be interlinked.
 2. Create one custom object, also called as Junction object, which should have auto number as unique identification.
 3. Create 2 Master relationships for both objects.
 4. On both objects, add this as related list.

Q25. Explain in what sequence Triggers and Automation rules run in Salesforce?

Ans: The following is the order Salesforce logic is applied to a record.
 1. Old record loaded from database (or initialized for new inserts)
 2. New record values overwrite old values
 3. System Validation Rules
 4. All Apex “before” triggers
 5. Custom Validation Rules
 6. Record saved to database (but not committed)
 7. Record reloaded from database
 8. All Apex “after” triggers
 9. Assignment rules
 10. Auto-response rules
 11. Workflow rules
 12. Escalation rules
 13. Parent Rollup Summary Formula value updated (if present)
 14. Database commit
 15. Post-commit logic (sending email)

This sequence can not be controlled.

Q26. If an object having 2 before triggers associated with it, is there any way to control the sequence of execution of 2 triggers.

Ans: The trigger execution sequence can not be controlled in Salesforce.

Q27. How to mass delete users data in Salesforce?

Ans: User data can be mass deleted from Data Management, Mass Delete Record option.

Q28. What are the difference between trigger.new and trigger.old?

Ans:
Trigger.new
 1. Returns the new version of sObject records
 2. Available only in insert and update events
 3. Records can be modified only in before events

Trigger.old
 1. Returns the old version of sObject records
 2. Available only in update and delete events

Q29. How to restrict a trigger to run only once? (How to avoid recursive trigger execution?)

Ans: Triggers can fire twice, once before workflow rules and once after workflow rules. The before and after trigger fire one more time only if something needs to be updated.

To avoid recursive execution of triggers, we need to have the code write something like below.

 public class HelperClass{
     public static boolena firstRun = true;
 }

 trigger Xtrigger on Account(before delete, after delete){
      if(Trigger.isBefore){
          if(Trigger.isDelete){
              if(HelperClass.firstRun){
                  Trigger.old[0].addError('Before Delete Error');
                  HelperClass.firstRun = false;
              }   
          }
      }
 }

Q30. What is the difference between WhoId and WhatId in the Data Model of Task?

Ans: WhoId refers to people things. So that would be typically a Lead ID or a Contact ID

WhatId refers to object type things, That would be typically be an Account Id or an Opportunity Id.

Q31. How can we provide the user login (Authentication) in public sites created by Salesforce?

Ans: We can provide the authentication on public sites using "Customer Portal"

Q32. What is Import Wizard? How many records can be imported using Import Wizard and what are the objects supported by Import Wizard?

Ans: Import Wizard is an easy-to-use multi step wizard.
Up to 50000 records can be imported using Import Wizard.
The Objects supported by Import Wizard are,
 1. Accounts
 2. Contacts
 3. Solutions
 4. Leads
 5. Custom Objects

The Import Wizard takes input as CSV file.

Q33. What are the difference between Lookup and Master Detail relationship?

Ans: Difference between Lookup and Master-Detail relationship are

Master Detail
 1. Cascade record deletion
 2. Child record must have a parent
 3. Cascade record level security
 4. Standard Object can not be on detail side of Master Detail
 5. Roll-up summary fields on parent object
 6. Master Detail relationship field is required on the page layout  of the detail record

Lookup
 1. This is optional, no parent requirement
 2. No impact on record security
 3. Roll-up summary fields cannot be established
 4. Lookup relationship is not automatically required

Q34. What are the different ways of making a field mandatory?

Ans: Field can be made mandatory in 4 ways
 1. In Page layout
 2. While creating a field, mark it as mandatory
 3. Use Validation Rule
 4. Use Trigger code

Q35. What are the ways in which Apex can be invoked?

Ans: Apex can be invoked in 4 ways
 1. Visualforce page
 2. Triggers
 3. Web Services
 4. Email Services

Q36. How do we expose functionality on Force.com to be consumed by external clients?

Ans: Using web services, external program access the functionality on force.com platform. WSDL will be generated and exposed to the host environment which results in extending the capability of accessing force.com platform from external program.

Q37. In what order the methods fire in apex?

Ans: The only rule is that the Setter methods fire before the action methods, for the action methods, no order is guaranteed.

Q38. What are the ways in which a visualforce page can be displayed?

Ans: Visualforce page can be displayed using below ways in salesforce.
 1. Links
 2. Buttons
 3. Tabs
 4. Inline frames

Q39. What are static resources? How it is used in Visualforce?

Ans: Static resources are new type storage in salesforce specially designed for use in visualforce pages. These files are cached by salesforce servers for better performance.
Usage: {!$Resource.fileName}

Q40. Difference between Person accounts and Business accounts?

Ans:
Person Account:
 1. Person Account is associated with Account
 2. Oriented towards doing business with person
 3. Need to contact Salesforce to enable it
 4. Once enabled, can't be disabled.

Business Account:
 1. Business Account is associated with Account and Contacts
 2. Oriented towards doing business with Companies

Q41. Write a query to retrieve all Opportunities with Attachments?

Ans: Select Id, (Select Id from Attachments) from Opportunity

Q42. How to report error message from a Trigger?

Ans: Error messages can be reported from triggers to avoid DML operations using addError()method on a record or a field.
The error will be logged in log and UI

Q43. What are differences between Roles and Profiles?

Ans:
Roles:
 1. Role control the visibility and access to organization's data at the record level.
 2. Roles are optional for users
Profiles:
 1. Profiles are set of permissions and settings which determines the objects, the fields of the object, tabs, and apps the user can access
 2. every user must associate with one Profile

Q44. What is the use of Salesforce.com sites?

Ans: Force.com enables you to create public websites and actions that are directly integrated with your Salesforce.com organization without requiring users to log in with a username and password. Any information stored in the organization can be publicly exposed through a branded URL. Sites are hosted on Force.com platform and built on visualforce pages.

Q45. What are Groups and their uses in Salesforce?

Ans: Groups are set of Users, Groups can contain individual users, other groups and users in particular roles or territory.
There are 2 types of Groups
 1. Private Groups
 Each users can create these groups for their personal use.
 2. Public Groups
 Only administrators can create public groups and can be used by everyone in the organization

The uses are:
 1. Sharing rules
 2. share records
 3. assign specific actions in Salesforce Knowledge

Q46. What are different types of Profiles in salesforce?

Ans: There are 2 types of Profiles in Salesforce
 1. Standard Profiles
 These are provided by Salesforce out of the box
 2. Custom Profiles
 These are created by cloning existing profiles by users

Q47. What are the Standard Profiles available in Salesforce?

Ans: There are 6 Standard profiles in Salesforce
 1. Read-Only
 2. Standard User
 3. Marketing User
 4. Contract Manager
 5. Solution Manager
 6. System Administrator

Q48. What are different kind of reports in Salesforce?

Ans: There are 4 types of reports in Salesforce
 1. Tabular - Tabular reports are similar to spread sheets, consist  of ordered set of fields in columns with each matching record  listed in a row. Tabular reports are best for creating list of  records with single grand total. These reports can't be used in  Dashboards unless the number of rows are specified.
 2. Summary Reports - Summary Reports are similar to tabular  reports, but also allow users to group rows of data, view sub  totals and create charts. These can be used as source reports for  dashboards.
 3. Matrix Reports - Matrix Reports are very similar to Summary  Reports but allow you to group and summarize data by both rows and  columns. These reports can be used as source reports for dashboards
 4. Joined Reports - Joined Reports let you to create multiple  report blocks that provide different views of your data. Each  blocks act like a sub report with its own fields, columns, sorting  and filtering. Joined report can even contain data from different  report types.

Q49. What are the different Dashboard components?

Ans:
 1. Charts
 2. Gauge
 3. Metric
 4. Table
 5. Visualforce Page
 6. Custom S-Control

Q50. What is Visualforce view state? what are the best practices to reduce the view state size?

Ans:
A visualforce page that contains form component also contain an encrypted, hidden form field that encapsulates the view state of the page. This view state is automatically created, and as its name suggests, it holds the page-state that includes the components, field values, and controller state.

The Best Practices are:
 1. Use only one Form tag per page, use apex:actionRegion instead of  using 2 or more forms.
 2. Refine SOQL to only retrieve the data needed by the page
 3. Mark any apex variables that are not necessary to the view state  as Transient.

 4. Use outputLink components instead of commandLinks or  commandButton components where possible as they don't need to be  nested in a form

Post a Comment

0 Comments