Contact

Wednesday, 22 May 2013

Salesforce interview Questions

1. What is the difference between Role & Profile in salesforce.com?
Ans. 
A profile contains user permissions and access settings that control what users can do within Salesforce.
Profiles control:
· Which standard and custom apps users can view
· Which tabs users can view
· Which record types are available to users
· Which page layouts users see
· Object permissions that allow users to create, read, edit, and delete records
· Which fields within objects users can view and edit
· Permissions that allow users to manage the system and apps within it
· Which Apex classes and Visualforce pages users can access
· Which desktop clients users can access
· The hours during which and IP addresses from which users can log in
· Which service providers users can access (if Salesforce is enabled as an identity provider)


Role:
Depending on your sharing settings, roles can control the level of visibility that users have into your organization’s data. Users at any given role level can view, edit, and report on all data owned by or shared with users below them in the hierarchy, unless your organization’s sharing model for an object specifies otherwise. Specifically, in the Organization-Wide Defaults related list, if the Grant Access Using Hierarchies option is disabled for a custom object, only the record owner and users granted access by the organization-wide defaults receive access to the object's records.

2. What are different portals in Salesforce.com?
Ans.    
Partner Portal:
A partner portal allows partner users to log in to Salesforce.com through a separate website than non-partner users. Partner users can only view & edit data that has been made available to them. An organization can have multiple partner portals.
Customer Portal:
Customer Portal provides an online support channel for customers allowing them to resolve their inquiries without contacting a customer service representative. An organization can have multiple customer portals.

3. What is the use of Salesforce.com Sites? 
Ans.  Force.com Sites enables you to create public websites and applications that are directly integrated with your Salesforce organization without requiring users to log in with a username and password. You can publicly expose any information stored in your organization through a branded URL of your choice. Sites are hosted on Force.com servers and built on native Visualforce pages. You can user authentication to a public site using customer portal.

4. How to import attachments using Data Loader?
Ans. Please follow the instructions below.
  1. Create an AttachmentList.csv file with the following column headers:
    • ParentId - ID of the record to which the attachment should be associated 
    • Name - Name of the attachment 
    • ContentType - Format of the extension (e.g. .xls, .pdf, etc) 
    • OwnerID - ID for the owner of the attachment
    • Body - File path to the Attachment on your local machine (C:\Attachments\FileName.pdf)
  2. Log in to the Data Loader. 
  3. Select the "Insert" command. 
  4. In the 'Select Sforce Object' step, select the ‘Attachments’ object. This object is not displayed by default hence check the ‘Show all Sforce Objects' checkbox. 
  5. Choose the AttachmentList.csv file. 
  6. In the mapping step, map the following fields:
    • Parent ID 
    • Name 
    • Owner ID 
    • Body - Make sure to map the Body column which you created previously with the file extension. This is how you designate the file and location of the attachments to be inserted. 
  7. Click "OK" to start the upload.
5. What are groups in SFDC and what is their use?
Ans. Groups are sets of users. They can contain individual users, other groups, the users in a particular role or territory, or the users in a particular role or territory plus all of the users below that role or territory in the hierarchy.
There are two types of groups:
  • Public groups: Only administrators can create public groups. They can be used by everyone in the organization.
  • Personal groups: Each user can create groups for their personal use.
You can use groups in the following ways:
  • To set up default sharing access via a sharing rule
  • To share your records with other users
  • To specify that you want to synchronize contacts owned by others users
  • To add multiple users to a Salesforce CRM Content library
  • To assign users to specific actions in Salesforce Knowledge
6. What are governor limits in Salesforc.com?
Ans. Governor limits are runtime limits enforced by the Apex runtime engine. Because Apex runs in a shared, multitenant environment, the Apex runtime engine strictly enforces a number of limits to ensure that code does not monopolize shared resources. Types of limits that Apex enforces are resources like memory, database resources, number of script statements to avoid infinite loops, and number of records being processed. If code exceeds a limit, the associated governor issues a runtime exception that cannot be handled thereby terminating the request
7. Which objects can be imported by Import Wizard?
Ans. Following objects can be imported using import wizard.
1.      Accounts
2.      Contacts
3.      Leads
4.      Solutions
5.      Custom Objects

8. Permission Sets:
A permission set is a collection of settings and permissions that give users access to various tools and functions. The settings and permissions in permission sets are also found in profiles, but permission sets extend users' functional access without changing their profiles.

9. What are custom settings?
Ans. Custom settings are similar to custom objects and enable application developers to create custom sets of data, as well as create and associate custom data for an organization, profile, or specific user. All custom settings data is exposed in the application cache, which enables efficient access without the cost of repeated queries to the database. This data can then be used by formula fields, validation rules, Apex, and the SOAP API.
There are two types of custom settings:
List Custom Settings
A type of custom setting that provides a reusable set of static data that can be accessed across your organization. If you use a particular set of data frequently within your application, putting that data in a list custom setting streamlines access to it. Data in list settings does not vary with profile or user, but is available organization-wide. Because the data is cached, access is low-cost and efficient: you don't have to use SOQL queries that count against your governor limits.
Hierarchy Custom Settings
A type of custom setting that uses a built-in hierarchical logic that lets you “personalize” settings for specific profiles or users. The hierarchy logic checks the organization, profile, and user settings for the current user and returns the most specific, or “lowest,” value. In the hierarchy, settings for an organization are overridden by profile settings, which, in turn, are overridden by user settings.

10.      How to schedule a class in Apex?
Ans:    To invoke Apex classes to run at specific times, first implement the Schedulable interface for the class, then specify the schedule using either the Schedule Apex page in the Salesforce user interface, or the System.schedule method.
After you implement a class with the Schedulable interface, use the System.Schedule method to execute it. The scheduler runs as system: all classes are executed, whether the user has permission to execute the class or not.
The System.Schedule method takes three arguments: a name for the job, an expression used to represent the time and date the job is scheduled to run, and the name of the class.
Salesforce only adds the process to the queue at the scheduled time. Actual execution may be delayed based on service availability. The System.Schedule method uses the user's time zone for the basis of all schedules. You can only have 25 classes scheduled at one time.
11.      How to delete an apex class or trigger in salesforce.com production environment?
Ans:    In salesforce.com production environment the Del option is not displayed for classes & triggers. Follow the below steps to delete file in production:
  1. Go to your sandbox (where you do your Trigger/Class development) and delete the Trigger/Class from there. Also delete the Test Methods that test the Class/Trigger.
  2. Go to Eclipse and do a Refresh from Server. This will make the files disappear within Eclipse.
  3. Then deploy to Production, ticking Delete next to the files in your Deployment Plan. (For safety, always Deselect All when deploying, then sort by Type. Only then tick which files to deploy, since choosing the wrong ones could cripple Production.)
12. What is the difference between custom controller and extension?
Ans.     Custom Controller: A custom controller is an Apex class that implements all of the logic for a page without leveraging a standard controller. Use custom controllers when you want your Visualforce page to run entirely in system mode, which does not enforce the permissions and field-level security of the current user.  
         Controller extension: A controller extension is an Apex class that extends the functionality of a standard or custom controller. Use controller extensions when:
  • You want to leverage the built-in functionality of a standard controller but override one or more actions, such as edit, view, save, or delete.
  • You want to add new actions.
  • You want to build a Visualforce page that respects user permissions. Although a controller extension class executes in system mode, if a controller extension extends a standard controller, the logic from the standard controller does not execute in system mode. Instead, it executes in user mode, in which permissions, field-level security, and sharing rules of the current user apply.
A controller extension is any Apex class containing a constructor that takes a single argument of type ApexPages.StandardController or CustomControllerName, whereCustomControllerName is the name of a custom controller you want to extend.
Note: Although custom controllers and controller extension classes execute in system mode and thereby ignore user permissions and field-level security, you can choose whether they respect a user's organization-wide defaults, role hierarchy, and sharing rules by using the with sharing keywords in the class definition.
13.What are different kinds of dashboard component?
Ans:
1. Chart: Use a chart when you want to show data graphically.
2. Gauge: Use a gauge when you have a single value that you want to show within a range of custom values.
3. Metric: Use a metric when you have one key value to display.
  • Enter metric labels directly on components by clicking the empty text field next to the grand total.
  • Metric components placed directly above and below each other in a dashboard column are displayed together as a single component.
4. Table: Use a table to show a set of report data in column form.
5. Visualforce Page: Use a Visualforce page when you want to create a custom component or show information not available in another component type
6. Custom S-Control: Custom S-Controls can contain any type of content that you can display or run in a browser, for example, a Java applet, an ActiveX control, an Excel file, or a custom HTML Web form

No comments:

Post a Comment