Quantcast
Wednesday , December 13 2017
Home / Salesforce Interview Questions / Salesforce interview Questions Latest

Salesforce interview Questions Latest

Salesforce interview Questions

In this post, I have collected all the Salesforce interview Questions which were asked to me in  Salesforce interview for 2-3 years of experience. I have compiled these questions to the best of my knowledge.

The answer provided here are answered to the best of my knowledge and they can be wrong, so kindly refer Apex developer guide and visualforce guide and other means to verify the answers.

If you think any answer is incorrect then do mention the same in the comments.

Here goes the list of Salesforce Interview Questions

Q 1. Which of the below can’t be used in Apex DML Operation?

  1. a) trigger.old
  2. b) trigger.new
  3. c) trigger.new and trigger.old
  4. d) None of the above

Q2.When considering trigger context variables, which of the statement is true?

  1. a) We can delete trigger.new
  2. b) We cannot delete trigger. new
  3. c) trigger.new is always ready only
  4. d) trigger.new is ready only, so we can delete
  5. e) None of the statement is true

3. In Apex, if you want to make something public, you need to use the PUBLIC access modifier.

4. On deletion of parent record, the child record should not getddeleted, which relationship will satisfy this requirement?

  1. a) Lookup
  2. b) Master-Detail
  3. c) Many to Many
  4. d) Master to Master
  5. e) Both b & c

Q.5. Product manager at XYZ company is required to help their sales team in selling certain products, but product manager does not have access to the opportunities and his involvement is required in assisting the deal. How will a salesforce admin resolve this scenario?

  1. a) Notify the product manager using opportunity update reminders
  2. b) Enable opportunity teams and allow users to add the product manager.
  3. c) Use similar opportunities to show opportunities related to the product manager.
  4. d) Enable account teams and allow users to add the product manager.

Q.6. When would a developer use upsert and external IDs? (There are two correct answers.)

  1. a)To integrate with an external system.
  2. b) To migrate customizations from sandbox to production.
  3. c) To load related records without knowing Salesforce record IDs.
  4. d) To use the Web Services API to query for data.

 

Q7. Considering child to parent relationship, you can traverse —

  1. a) up to five levels
  2. b) up to one level only
  3. c) up to three levels
  4. d) up to four levels
  5. e) All of the above statements are true

Q.8. Which of the Data format and communication is supported by REST API?

  1. a) XML and Synchronous
  2. b) JSON, XML and Asynchronous
  3. c) JSON, XML and Synchronous
  4. d) JSON and Synchronous
  5. e) None of the above

9. Which of the authorizations are supported by SOAP API ?

  1. a) Session ID
  2. b) Oath 2.0
  3. c) Both Oath 2.0 and Session ID
  4. d) None of the above

Q.10. Write a SOQL query to find the Ids and Cust__c of the Object CustObj__c. CustF__c field should contain either of the below values —

*AAA and BBB selected or *CCC selected

Select id, Cust__c  from CustObj__c where CustF__c  includes(‘AAA;BBB’,’CCC’)

*CCC selected

Select id, Cust__c  from CustObj__c where CustF__c  includes(‘CCC’)

 

Q.11. Write an SOQL query which returns account IDs for all Accounts that do not have any open Opportunities?

select id from account where id in (select accountid from opportunity where stagename in (‘Closed Won’, ‘Closed lost’))

Q.12. Which of the below SOQL query is true?

  1. a) Select Account.Narne , (Select Note.Body From Account.Notes ) From Account
  2. h) Select Account.Name , (Select Note.Body From Account.Notes where Note.Body LIKE `D%’) From Account

 

Q.13. Which one is a valid exception handling block in Apex?

a) try { code block }

catch (exceptionType)

{ code_block }

finally code block

 

b) try { code block }

catch (exceptionType)

code block

}

 

c)try { code block }

catch (exceptionType) {

code block }

catch (Exception e){ }

d) All of the above.

e) None of the above.

Q.14. Class annotated with isTest must be declared as?

a)Private

b)Public

c)Global

d)Private and Public both

e) None of the above

Q.15. Which statement is False regarding the isTest annotation

  1. a) Classes defined as isTest must be declared as Private.
  2. b) Classes defined as isTest do not count against organizations limits for Apex scripts.
  3. c) Classes defined as isTest cannot be called from another class or trigger.
  4. d) Classes defined as isTest can only contain methods declared as test methods.
  5. e) None of the above

Q.16. Which triggers are invoked when two contacts are Merged?

  1. a) Only delete and update contact triggers
  2. b) Only delete and update triggers on the parent account
  3. c) No triggers
  4. d) Delete and update contact triggers and triggers on the parent account
  5. e) None of the above

Q.17. In Salesforce which fields are indexed automatically?

  1. a) Primary keys
  2. b) External lds
  3. c) Audit dates (such as last modified date)
  4. d) Only External ids and audit dates
  5. e) All of the above

Q.18. Given the controller code what is the expected output?

<apex:page controller=”the controller”>

{lout}

<apex: page>

public class theController

{

public string out{

get {

if(out== null) out = ‘getter’;

return out ;

}

set;

public theController()

{

Out= ‘constructor’;

}

public void setout

{ out = ‘action’; }

}

  1. a) null
  2. b) action
  3. c) constructor
  4. d) getter.

Q.19. Which among these is a valid SOQL to query all records in an organization, including delete and archived activities?

  1. a) SELECT count() FROM contact WHERE accountid = a.id QUERY ALL.
  2. b) SELECT count() FROM contact WHERE accountid = a.id INCLUDE ALL.
  3. c) SELECT count() FROM contact WHERE accountid = a.id ALL ROWS.
  4. d) None of the above.

Q.20. How can permission sets be used?

  1. a) To assign unique login hours for specific users
  2. b) To assign access to a custom object for specific users
  3. c) To assign access to a custom field for specific users
  4. d) Only b & c
  5. e) All of the above

Q.21. Customer wants to add a custom validation process to the contact save process. Before the record is created and saved to the database, the customer wants run a validation, which will checks if the associated account is active or not, this validation should be active for all UI as well as integration requests. Which design accomplish this

  1. a) A custom Web service
  2. b) A before insert trigger
  3. c) A custom Visualforce controller
  4. d) A client-side 5-control

Q.22. What types of element do list contains.

  1. a) Integer
  2. b) String
  3. c) Object
  4. d) Integer and string
  5. e) All of the above

Q.23. Which of the following code segments show a correct way of accessing data with Standard List Controllers?

  1. <apex:page standardController=”Account” recordSetVar—“accounts” >

<apex:pageBlock >

 <apex:pageBlockTable value=”{!accounts}” var=”a”>

 <apex:column value=”{!a.name}”/>

 </apex:pageBlockTable>

</apex:pageBlock>

 </apex:page>.

  1. <apex:page standardController=”Account” var=”accounts” >

<apex:pageBlock >

<apex:pageBlockTable value=”{!accounts}” var=”a”>

<apex:column value=”{!a.name}”/>

</apex:pageB1ockTabie>

</apex:pageBlock>

</apex:page>

  1. <apex:page standardListController=”Account” recordSetVar=”accounts” >

<apex:pageBlock >

<apex:pageBlockTable value=”{!accounts}” var=”a”>

<apex:column value=”f!a.namer>

</apex:pageBlockTable>

<apex:pageBlock>

<apex:page>

  1. <apex:page standardListController=” Account” var=”accounts” >

<apex:pageBlock >

<apex:pageBlockTable value=”{laccounts}” var=”a”>

<apex:column value=”a.name}”/>

</apex: pageBlockTable>

</apex:pageBlock>

</apex:page>.

Q.24. Which among these is a valid constructor for standard controller extension on Account?

  1. a) public myControllerExtension(ApexPages.Controller stdController){

this.acct= ( Account)stdController.getRecord();

}

  1. b) public myControllerExtension(ApexPages.StandardSetController stdController){

this.acct = (Account)stdController.getRecord();

  1. c) public myControllerExtension(ApexPages.StandardController stdController) {

this.acct = (Account)stdController.getRecord();

  1. d) None of the above.

 

About Sumit Datta

Sumit Datta

I am a 3x Certified Salesforce developer with overall 4.5 years of IT experience and 2.5 years of Implementation experience in Salesforce. I am here to share my knowledge and help Beginners in Salesforce to understand the concepts of Apex, Visualforce and Salesforce Configuration.

Check Also

Dreamforce

Dreamforce Global Gathering 2017, my experience and why one should not miss this event.

Dreamforce Global Gathering 2017, my experience and why one should not miss this event. First …

Salesforce AppBuilder Certification

Salesforce AppBuilder Certification Mock Exam 1

Want to test your preparation for the Salesforce AppBuilder Certification?   Salesforce AppBuilder Certification mock Exam …

Salesforce Platform Developer 1 Certification

Salesforce Platform Developer 1 Certification Mock Exam 2

Want to test your preparation for the Salesforce Platform Developer 1 Certification? Then go through …

Advanced Formula, Salesforce Platform unleashed!!!

Advanced Formulas Introduction to formula fields and Advanced Formulas Formula Field is a powerful capability …

3 comments

  1. Its really nice

  2. Thank you for sharing great listing salesforce interview question and answer. i am looking for job change in salesforce

Leave a Reply

Your email address will not be published. Required fields are marked *