Monday, June 13, 2016

Cognizant (CTS)/Velankani Salesforce Interview Questions with Answers


1. What are the Types of Account and difference between them?
    Basically in Salesforce we have two types of Accounts. Those are Business Account and Person Account and the main difference between them is in Business Account we can create a contact under this business account where in case of Person Account we will not be able to create any contact under this account but same person account can be refer as contact also

2. Through Sales force Import wizard how many records we can import?
 We can import up to 50000 records at a time using the wizard.

3. What’s the maximum batch size in a single trigger execution?
  Usually the batch size would be 200

4. What is whoid and whatid in activities?
  Whoid always represent the person to whom this activity is linked usually it can be Contact or Lead record and WhatId always represent to which object this activity is related too.

5. What does the View State represent in a Visualforce page?
 When we are making a any request to database through controller internally some HTTP request
 will takes between browser and the servers so at that time to retain the state of the whole page after  completion of request (usually we call it as POST Back calls) Salesforce internally creates one form to  hold the status of the all components in page to retain back after the call we call it as View State.

6. Difference between controllers and extensions ?
  Controllers: Let take if your Business requirement not doable with standard functionality/Standard Controllers then we will go our own customization where   you will implement your own piece of code/logic .It's always runs in System mode.
  Extensions : These extensions always used to use an existing functionality as well as on top it if you want to include any extra piece of code we will go with this these extensions  can be used along with standard controller or Custom Controllers. 

7. How will you avoid recursive triggers? 
  To avoid the recursive triggers we have to use a static Boolean variable which help us to stop the recursive triggers. 

8. What is @future method?
  If you want to execute any piece of code in Asynchronous we can go with @future annotation and if you’re running in Asynchronously  you will be benefited with some extra limits and best example when we are   getting MIXED DML in Process builder we will go with this one.

9.What is Trigger.old and Trigger.New ?
  These Trigger.New and Trigger.Old both are trigger context variable which will be used to get the run time context of the trigger.
  Trigger.new : Which holds the list of new records values and it will be available in only insert, update and after Undelete operations only.
  Trigger.Old : Which holds the list of old records values and it will be available in all update and delete triggers.

10.What is a external id in salesforce?
 When we are making any kind of data loading into Salesforce from some external resources like SAP or Oracle then we will consider this external field as an unique identifier to identify the records in both the systems and for an object max we can create upto 3 external Ids.

11.Batch Apex Governor Limits
  a)We can have maximum 5 jobs at a time either active or queued
  b)The maximum number of batch executions is 250,000 per 24 hours

  c) Maximum batch size for Query Locator is 2000 and default size is 200.



No comments:

Post a Comment