Salesforce Dev 401 (Dumps-2)

1. Why would a developer use Test.startTest() and Test.stopTest()?
A.To avoid Apex code coverage requirements for the code between lines.
B.To start and stop anonymous block execution when executing anonymous Apex code.
C.To indicate test code so that it does not impact Apex line count governor limits.
D.To create additional set of governor limits during the execution of single test class.
Ans.D

2. What must the controller of a visualforce page utilize to override the standard Opportunity view button
A.The StandardSetController to support related list in pagination
B.The Opportunity StandardController for pre-built functionality.
C.The callback constructor to reference the standard controller.
D.A constructor that initializes a private Opportunity variable.
Ans.B

3. A developer creates a workflow rule declaratively that updates a field on an object. An Apex trigger exists for the object. What happens when a user updates a record?

A.No changes are made to data.
B.Both the Apex Trigger and Workflow Rule are fired only once.
C.The Workflow Rule is fired more than once.
D.The Apex Trigger is fired more than once.
Ans.D

4. The sales management team requires that the Lead Source field of the Lead record be populated when a Lead is converted. What would a developer do to ensure that a user populates the Lead Source field prior to converting the Lead?
A.Process Builder
B.Validation Rule
C.Formula Field
D.Workflow Rule
Ans.B

5. Where can a developer create managed package?
A.Developer Edition
B.Developer Sandbox
C.Enterprise Edition
D.Unlimited Edition
Ans.A

6. What is a valid way of loading external JavaScript file into VF page?

A.Using <link> tag.
B.Using <apex:define> tag.
C.Using <apex:includeScript> tag.
D.Using <script> tag

Ans.C;D

7. What is the benefit of the Lightning Component Framework?
A.Better integration with Force.com sites.
B.More pre-built components to replicate Salesforce look and feel.
C.More centralized control via server side logic.
D.Better performance for custom Salesforce mobile apps.
Ans.B

8. What is true of a partial sandbox that is not true of a full sandbox? Choose 2 answers
A.More frequent refreshes.
B.Only includes necessary metadata.
C.Use of change sets.
D.Limited to 5 GB of data.
Ans.A;D

9. In which order does Salesforce executes events upon saving a record?
A.Before triggers; Validation rules; After triggers; Assignment rules; Workflow rules; Commit
B.Validation rules; Before triggers; After triggers; Workflow rules; Assignment rules; Commit
C.Before triggers; Validation rules; After triggers; Workflow rules; Assignment rules; Commit
D.Validation rules; Before triggers; After triggers; Assignment rules; Workflow rules; Commit
Ans.D

10. When loading data into an organization, what can a developer do to match records to update existing records? Choose 2 answers
A.Match an external id text field to a column in the imported file.
B.Match the Id field to a column in the imported file.
C.Match the Name field to a column in the imported file.
D.Match an auto generated number field to a column in the imported file.
Ans.A;B

11. In an organization that has enabled multiple currencies, a developer needs to aggregate the sum of the Estimated_Value__c currency field from the CampaignMember object using a roll-up summary field called Total_Estimated_Value__c on Campaign. How is the currency of the Total_Estimated_Value__c roll-up summary field determined?
A.The values in CampaignMember.Estimated_Value__c are converted into the currency of the Campaign record, and the sum is displayed using currency on the Campaign record.
B.The values in CampaignMember.Estimated_Value__c are converted into the currency of majority of the CampaignMember recordsand the sum is displayed using that currency.
C.The values in CampaignMember.Estimated_Value__c are summed up and the resulting field Total_Estimated_Value__c is displayed as a numeric field on the campaign record.
D.The values in CampaignMember.Estimated_Value__c are converted into the currency of the current user, and the sum is displayed using the currency of the campaign record.
Ans.A

12. A candidate may apply to multiple jobs at the company Universal Containers by submitting a single application per job posting. Once an application is submitted for a job posting, that application cannot be modified to be resubmitted to a different job opening. What can the administrator do to associate an application with each job posting in the schema of the organization?
A.Create a lookup relationship on both objects to a junction object called Job PosingApplications.
B.Create a master-detail relationship in the Job Posting object to Application object.
C.Create a master-detail relationship in the Application object to Job Posting object.
D.Create a lookup relationship in the Application object to the Job Posting object.
Ans.C

13. What is the characteristic of the Lightning Component Framework? Choose 2 answers.
A.It has an event-driven architecture
B.It works with existing visualforce pages
C.It includes responsive components
D.It uses XML as its data format.
Ans.A;C

14. What is the capability of the cross-object formula fields? Choose 3 answers.
A.Formula fields can reference fields from master-detail or lookup parent relationships.
B.Formula fields can expose data the user does not have access in the record.
C.Formula fields can be used in the three roll-up summaries per object.
D.Formula fields can reference fields from objects that are up to A0 relationships away. (extra answer)
Ans.A;B;D

15. A developer has a block of code that omits any statement that indicate whether the code block should execute with or without sharing. What will automatically obey the organization wide defaults and sharing settings for the user who executes the code in the Salesforce organization?
A.Apex Triggers
B.HTTP Callouts
C.Apex Controllers
D.Anonymous Blocks
Ans.D

16. A developer created an Apex Trigger using Developer Console and now wants to debug the code. How can the developer accomplish this in the Developer Console?
A.Select the Override Log Triggers checkbox for the trigger.
B.Add the user name in the Log Inspector.
C.Open the Progress tab in the Developer Console.
D.Open the Logs tab in the Developer Console.
Ans.D

17. A developer uses a before insert trigger on the Lead object to fetch Territory__c object, where the Territory__c.PostalCode__c matches the Lead.PostalCode.. The code fails when the developer uses Apex data loader to insert 100000 lead records. The developer executes the below code: 01 For (Lead l: Trigger.new){ 02 If(l.postalCode != null){ 03 List terrList = [SELECT Id FROM Territory__c WHERE PostalCode__c = :l.PostalCode]; 04 If(terrList.size() >0){ 05 l.Territory__c = terrList[0].Id; } } } Which line of code is causing the code block to fail?
A.03: A SOQL query is located inside of the for loop code.
B.01: Trigger.new is not valid in a before insert trigger.
C.02: A NullPointerException is thrown if PostalCode is null
D.05: The Lead in a before insert trigger cannot be updated.
Ans.A

18. Which data structure is returned to a developer when performing SOSL search?
A.A list of lists of sObjects
B.A map of sObject type to a list of sObjects.
C.A map of sObejct type to a list of lists of sObjects.
D.A list of sObjects.
Ans.A

19. How can a developer avoid exceeding governor limits when using Apex Trigger?
A.By using a helper class that can be invoked from multiple triggers.
B.By using Database class to handle DML transactions
C.By using Maps to hold data from query results.
D.By performing DML transactions on list of sObjects.
Ans.C;D

20. What is a correct pattern to follow when programming in Apex on a multi-tenant platform?
A.Apex Code is created in a separate environment from schema to reduce deployment errors.
B.DML is performed on one record at a time to avoid possible data concurrency issues.
C.Queries select the fewest fields and records possible to avoid exceeding governor limits.
D.Apex classes use the “with sharing” keyword to prevent access from the other server tenants.
Ans.C

Leave a Reply

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