Sunday, September 11, 2016

Interview Questions-Part2

1) What is the advantage of using custom setting?
AnsYou donot have to query in apex(fire select query) to retrieve the data stored in custom settings.

2) what is whoid and whatid in activities?

Ans: Whoid is the id of either contact or lead.Whatid is the id of the related to record in activiity record(standard or custom object).

3) what is the difference between  a standard controller and custom controller?

Ansstandard controller inherits all the standard object properties,standard button functionalities can be directly used.Custom controller defines custom functionalities,a standard controller can be extended to develop custom functionalities using keyword "extensions".

4) Can you have more than one extension associated with a single page?
AnsYes we can have more than one extension.

5) If page is having extensions and if two extensions have methods of same name.Then which method out of these two will be called from vf page?
AnsThe one which is present in the controller defined on the left side will be called.

6) What are governer limits?
Ans: Governer limits are the limits impossed by salesforce so as to avoid monopoly by orgs in using salesforce shared resources.

7) What is the difference between force.com and salesforce.com?
Ans: force.com is paas(platform as a service) and salesforce.com is Saas(Software as a service)

8) How many records can a select query return?
AnsAs of now,it can return upto 50000 records.

9) How many records can a sosl query return?

AnsAs of now it can return upto 2000 records.

10) How can you access custom label in visualforce page?
AnsUse this syntax for accessing custom label in visualforce page - {!Label.LabelName} where LabelName is the name of Label.

11) How can you query all records(including deleted records) using an SOQL query?

AnsUsing ALL Rows Keyword.This will query all records including deleted records in recyclebin.
Eg:List <Account> accountList = [select id from account  ALL ROWS];

12) What is the use of @future annotation?

AnsUsing @future annotation with a method executes it whenever salesforce has resources available.

13) what is the significance of static keyword?
AnsMethods,variables when defined as static are initialized only once when class is loaded.Static variables are not transmitted as part of view state for a visualforce page

14) Can custom setting be accessed in a test class?
AnsCustom setting data is not available default in a test class.We have to set seeAllData parameter true while defining a test class as below
@isTest(seeAlldata=true).

15) what is the difference between role and profile?
AnsRole defines record level access while profile defines object level access.

16) Through Sales force Import wizard how many records we can import?

Ans : Using Import wizard, we can upload up to 50000 records.

17) Import wizard will support for which Objects?

Ans : Only Accounts, Contacts, Leads, Solutions and custom object’s data can be imported.  If we want to import other objects like Opportunities and other object’s data, then we need to go for Apex Data Loader.

18)  What is app exchange?

Ans : The developed custom applications can be uploaded into the app exchange so that the other person can share the applicaition.

19) What is a VLOOKUP in S.F?

Ans : VLOOKUP is actually a function in sales force which is used to bring relevant value to that record from another record automatically.

20) When I want to export data into SF from Apex Data Loader, which Option should be enable in Profile?

Ans : Enable API

21) What is a web - lead?

Ans : Capturing a lead from a website and routing it into lead object in Sales Force is called wed-lead (web to lead).

22) What are the Types of Account and difference between them?

Ans : We have two types of accounts.
Personal accounts
Business accounts

In personal accounts, person’s name will be taken as primary considerations where as in business accounts, there will be no person name, but company name will be taken into consideration.

23) What is a Wrapper Class in S.F?

Ans : A wrapper class is a class whose instances are collections of other objects.

24) What are formula and Rollup Summary fields and Difference between them? When should Rollup- Summary field enable?

Ans : 
Formula: A read-only field that derives its value from a formula expression that we define. The formula field is updated when any of the source fields change.

Rollup Summary: A read-only field that displays the sum, minimum, or maximum value of a field in a related list or the record count of all records listed in a related list.

25) What is a Sandbox? What are all the Types of sandboxex?

Ans : Sandbox is the exact replica of the production.

4 Types:
Developer
Developer Pro
Partial Copy
Full Copy

26)Difference between insert and Database.insert()

Ans : 

Database.insert() :


                             Using the  Database.insert()  we can specify whether or not to allow for partial record processing if errors are encountered .

                              It means even though errors are present while doing insert/update/delete operation,if we use Database methods, process will continue .

insert :


           Using the Insert statement we can not specify whether or not to allow for partial record processing if errors are encountered .

              It means if errors are present while doing insert/update/delete operation,the process will get stopped and error is thrown away. 

No comments:

Post a Comment