Salesforce Platform Dev I Sample Test Flashcards

1
Q

Why would a developer use Test. startTest( ) and Test.stopTest( )?

A. To avoid Apex code coverage requirements for the code between these 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 an additional set of governor limits during the execution of a single test class.

A

D. To create an additional set of governor limits during the execution of a single test class.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What must the Controller for a Visualforce page utilize to override the Standard Opportunity view button?

A. The StandardSetController to support related lists for pagination.
B. the Opportunity StandardController for pre -built functionality.
C. A callback constructor to reference the StandardController.
D.A constructor that initializes a private Opportunity variable.

A

B. the Opportunity StandardController for pre -built functionality.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

A developer uses a before insert trigger on the Lead object to fetch the Territory__c object, where the Territory__c.PostalCode__c matches the Lead.PostalCode. The code fails when the developer uses the Apex Data Loader to insert 10,000 Lead records. The developer has the following code block:

Line-01: for (Lead l : Trigger.new){
Line-02: if (l.PostalCode != null) {
Line-03: List terrList = [SELECT Id FROM Territory__c WHERE PostalCode__c = :l.PostalCode];
Line-04: if(terrList.size() > 0)
Line-05: l.Territory__c = terrList[0].Id;
Line-06: }
Line-07: }

Which line of code is causing the code block to fail?

A. Line-03: A SOQL query is located inside of the for loop code.
B. Line-01: Trigger:new is not valid in a before insert Trigger.
C. Line-02: A NullPointer exception is thrown if PostalCode is null.
D. Line-05: The Lead in a before insert trigger cannot be updated.

A

A. Line-03: A SOQL query is located inside of the for loop code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What would a developer do to update a picklist field on related Opportunity records when a modification to the associated Account record is detected?

A. Create a process with Process Builder.
B. Create a workflow rule with a field update.
C. Create a Lightning Component.
D. Create a Visualforce page.

A

A. Create a process with Process Builder.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which requirement needs to be implemented by using standard workflow instead of Process Builder?
Choose 2 answers

A. Create activities at multiple intervals.
B. Send an outbound message without Apex code.
C. Copy an account address to its contacts.
D. Submit a contract for approval.

A

A. Create activities at multiple intervals.

B. Send an outbound message without Apex code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

An org has different Apex Classes that provide Account -related functionality.
After a new validation rule is added to the object, many of the test methods fail.
What can be done to resolve the failures and reduce the number of code changes needed for future validation rules?

Choose 2 answers:

A. Create a method that creates valid Account records, and call this method from within test methods.
B. Create a method that loads valid Account records from a Static Resource, and call this method within test methods.
C. Create a method that performs a callout for a valid Account record, and call this method from within test methods.
D Create a method that queries for valid Account records, and call this method from within test methods.

A

A. Create a method that creates valid Account records, and call this method from within test methods.

B. Create a method that loads valid Account records from a Static Resource, and call this method within test methods.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which component is available to deploy using Metadata API?

Choose 2 answers

A. Case Layout
B. Account Layout
C. Case Feed Layout
D. ConsoleLayout

A

A. Case Layout

B. Account Layout

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

In the code below, what type does Boolean inherit from?
Boolean b= true;

A. Enum
B. Object
C. String
D. Class

A

B. Object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the preferred way to reference web content such as images, style sheets, JavaScript, and other libraries that is used in Visualforce pages?

A. By accessing the content from Chatter Files.
B. By uploading the content in the Documents tab.
C. By accessing the content from a third -party CDN.
D. By uploading the content as a Static Resource.

A

D. By uploading the content as a Static Resource.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

A company has a custom object named Warehouse. Each Warehouse record has a distinct record owner, and is related to a parent Account in Salesforce.
Which kind of relationship would a developer use to relate the Account to the Warehouse?

A. One -to -Many
B. Lookup
C. Master -Detail
D. Parent -Child

A

B. Lookup

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

A developer creates a Workflow Rule declaratively that updates a field on an object. An Apex update trigger exists for that object.
What happens when a user updates a record?

A. No changes are made to the 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.

A

D. The Apex Trigger is fired more than once.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is true for a partial sandbox that is not true for 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.

A

A. More frequent refreshes.

D. Limited to 5 GB of data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

In which order does SalesForce execute 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

A

A. Before Triggers; Validation Rules; After Triggers; Assignment Rules; Workflow Rules; Commit

Ref: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_order_of_execution.htm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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.

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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 the currency on the Campaign record.
B. The values in CampaignMember.Estimated_value__c are converted into the currency on the majority of the CampaignMember records and the sum is displayed using that currency.
C. The values in CampaignMember.Estimated_value__c are summed up and the resulting Total_estimated_value__c field 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 on the Campaign record.

A

A. The values in Campaignmember.Estimated_value__c are converted into the currency of the Campaign record and the sum is displayed using the currency on the Campaign record.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

A candidate may apply to multiple jobs at the company Universal Containers by submitting a single application per job posting, that application cannot be modified to be resubmitted to a different job posting.

What can the administrator do to associate an application with each job posting in the schema for the organization?

A. Create a lookup relationship on both objects to a junction object called Job Posting Applications.
B. Create a master-detail relationship in the Job Postings custom object to the Applications custom object.
C. Create a master-detail relationship in the Application custom object to the Job Postings custom object.
D. Create a lookup relationship in the Applications custom object to the Job Postings custom object.

A

C. Create a master-detail relationship in the Application custom object to the Job Postings custom object.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is a 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.

A

A. It has an event-driven architecture.

C. It includes responsive components.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is a capability of 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 to in a record.
C. Formula fields can be used in three roll-up summaries per object.
D. Formula fields can reference fields in a collection of records from a child relationship.
E. Formula fields can reference fields from objects that are up to 10 relationships away.

A

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 to in a record.

E. Formula fields can reference fields from objects that are up to 10 relationships away.

Ref:
https://help.salesforce.com/HTViewHelpDoc?id=customize_cross_object.htm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

A developer has a block of code that omits any statements 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

A

D. Anonymous Blocks

Ref: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_sharing.htm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

A developer created an Apex trigger using the Developer Console and now wants to debug 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.

A

D. Open the logs tab in the Developer Console.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Which data structure is returned to a developer when performing a SOSL search?

A. A list of lists of sObjects.
B. A map of sObject types to a list of sObjects
C. A map of sObject types to a list oflists of sobjects
D. a list of sObjects.

A

A. A list of lists of sObjects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

How can a developer avoid exceeding governor limits when using an Apex Trigger?
choose 2 answers

A. By using a helper class that can be invoked from multiple triggers.
B. By using the Database class to handle DML transactions.
C. By using Maps to hold data from query results.
D. By performing DML transactions on lists of SObjects.

A

C. By using Maps to hold data from query results.

D. By performing DML transactions on lists of SObjects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

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 other server tenants.

A

C. Queries select the fewest fields and records possible to avoid exceeding governor limits.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What should a developer working in a sandbox use to exercise a new test Class before the developer deploys that test to production?
Choose 2 answers

A. The REST API and ApexTestRun method
B. The Apex Test Execution page in Salesforce Setup.
C. The Test menu in the Developer Console.
D. The Run Tests page in Salesforce Setup.

A

B. The Apex Test Execution page in Salesforce Setup.

C. The Test menu in the Developer Console.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

A company that uses a Custom object to track candidates would like to send candidate information automatically to a third -party human resource system when a candidate is hired.
What can a developer do to accomplish this task?

A. Create an escalation rule to the hiring manager.
B. Create an auto response rule to the candidate.
C. Create a Process Builder with an outbound message action.
D. Create a workflow rule with an outbound message action.

A

D. Create a workflow rule with an outbound message action.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

A developer is creating an application to track engines and their parts. An individual part can be used in different types of engines.
What data model should be used to track the data and to prevent orphan records.

A. Create a junction object to relate many engines to many parts though a master -detail relationship.
B. Create a master -detail relationship to represent the one -to -many model of engines to parts
C. Create a lookup relationship to represent how each part relates to the parent engine object.
D. Create a junction object to relate many engines to many parts through a lookup relationship.

A

A. Create a junction object to relate many engines to many parts though a master -detail relationship.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

What is the accurate statement about with sharing keyword?
choose 2 answers

A) Inner class donot inherit the sharing setting from the container class
B) Both inner and outer class can be declared as with sharing
C) Either inner class or outer classes can be declared as with sharing but not both
D) Inner class inherit the sharing setting from the conatiner class
A

A) Inner class donot inherit the sharing setting from the container class

B) Both inner and outer class can be declared as with sharing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

How can a developer refer to, or instantiate a PageReference in Apex?
Choose 2 answers

A. By using a PageReference with a partial or full URL.
B. By using the Page object and a Visualforce page name.
C. By using the ApexPages.Page() method with a Visualforce page name.
D. By using the PageReference.Page() method with a partial or full URL.

A

A. By using a PageReference with a partial or full URL.

B. By using the Page object and a Visualforce page name.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Which standard field needs to be populated when a developer inserts new Contact records programmatically?

A. Accountld
B. Name
C. LastName
D. FirstName

A

C. LastName

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

A developer creates a new Visualforce page and Apex extension, and writes test classes that exercise 95% coverage of the new Apex extension.
Change set deployment to production fails with the test coverage warning: “Average test coverage across all Apex classes and triggers is 74%, at least 75% test coverage is required.”

What can the developer do to successfully deploy the new Visualforce page and extension?

A. Create test classes to exercise the Visualforce page markup.
B. Select “Disable Parallel Apex Testing” to run all the tests.
C. Add test methods to existing test classes from previous deployments.
D. Select “Fast Deployment’’ to bypass running all the tests.

A

C. Add test methods to existing test classes from previous deployments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

What is the minimum log level needed to see user generated debug statements?

A. DEBUG
B. FINE
C. INFO
D. WARN

A

A. DEBUG

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

Developer needs to automatically populate the ReportsTo field in a Contact record based on the values of the related Account and Department fields in the Contact record.
Which type of trigger would the developer create?

Choose 2 answers

A. before update
B. after insert
C. before insert
D. after update

A

A. before update

C. before insert

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

To which primitive data type in Apex is a currency field atomically assigned?

A. Integer
B. Decimal
C. Double
D. Currency

A

B. Decimal

Ref: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_primitives.htm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Which resource can be included in a Lightning Component bundle?
Choose 2 answers

A. Apex class
B. Adobe Flash
C. JavaScript
D. Documentation

A

C. JavaScript

D. Documentation

Ref: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/components_bundle.htm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
35
Q

A custom exception “RecordNotFoundException” is defined by the following code of block.
public class RecordNotFoundException extends Exception()
which statement can a developer use to throw a custom exception?
choose 2 answers
A. throw new RecordNotFoundException(“problem occured”);
B. throw new RecordNotFoundException();
C. throw RecordNotFoundException(“problem occured”);
D. throw RecordNotFoundException();

A

A. throw new RecordNotFoundException(“problem occured”);

B. throw new RecordNotFoundException();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
36
Q

When creating unit tests in Apex, which statement is accurate?

A. Unit tests with multiple methods result in all methods failing every time one method fails.
B. Increased test coverage requires large test classes with many lines of code in one method.
C. Triggers do not require any unit tests in order to deploy them from sandbox to production.
D. System Assert statements that do not Increase code coverage contribute important feedback in unit tests

A

D. System Assert statements that do not Increase code coverage contribute important feedback in unit tests

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
37
Q

What is a valid Apex statement?

A. Map conMap = (SELECT Name FROM Contact);
B. Account[] acctList = new List{new Account()}
C. Integer w, x, y = 123, z = 'abc',
D private static constant Double rate = 775;
A

B. Account[] acctList = new List{new Account()}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
38
Q
A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple sObjects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URL
Which statement is unnecessary inside the unit test for the custom controller?

A. public ExtendedController (ApexPages.StandardController cntrl) { }
B. ApexPages.currentPage().getParameters().put(‘input’, ‘TestValue’)
C. Test.setCurrentPage(pageRef),
D. String nextPage = controller.save().getUrl();

A

A. public ExtendedController (ApexPages.StandardController cntrl) { }

code is inside the unit test, so you would not be defining the class constructor regardless

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
39
Q

A developer wants to display all of the available record types for a Case object. The developer also wants to display the picklist values for the Case.Status field. The Case object and the Case Status field are on a custom visualforce page.
Which action can the developer perform to get the record types and picklist values in the controller?
Choose 2 answers
A. Use Schema.PIcklistEntry returned by Case Status getDescribe().getPicklistValues().
B. Use Schema.RecordTypeinfo returned by Case.SObjectType getDescribe().getRecordTypelnfos()
C. Use SOQL to query Case records in the org to get all the RecordType values available for Case.
D. Use SOQL to query Case records in the org to get all value for the Status picklist field.

A

A. Use Schema.PIcklistEntry returned by Case Status getDescribe().getPicklistValues().
B. Use Schema.RecordTypeinfo returned by Case.SObjectType.getDescribe().getRecordTypelnfos()

Ref:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_Schema_RecordTypeInfo.htm#apex_class_Schema_RecordTypeInfo

https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_Schema_PicklistEntry.htm%23apex_class_Schema_PicklistEntry

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
40
Q

An sObject named Application_c has a lookup relationship to another sObject named Position_c. Both Application _c and Position_c have a picklist field named Status_c.
When the Status_c field on Position_c is updated, the Status_c field on Application_c needs to be populated automatically with the same value, and execute a workflow rule on Application_c.
How can a developer accomplish this?

A. By changing Application_c.Status_c into a roll -up summary field.
B. By changing Application_c.Status_c into a formula field.
C. By using an Apex trigger with a DML operation.
D. By configuring a cross-object field update with a workflow.

A

B. By changing Application_c.Status_c into a formula field.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
41
Q

A developer wrote a workflow email alert on case creation so that an email is sent to the case owner manager when a case is created?

When will the email be sent?

A. Before Trigger execution
B. After Committing to database.
C. Before Committing to database
D. After Trigger execution.

A

B. After Committing to database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
42
Q

Which code represents the Controller in MVC architecture on the Force.com platform.
Choose 2 answers

A. JavaScript that is used to make a menu item display itself.
B. StandardController system methods that are referenced by Visualforce.
C. Custom Apex and JavaScript code that is used to manipulate data.
D. A static resource that contains CSS and Images.

A

B. StandardController system methods that are referenced by Visualforce.

C. Custom Apex and JavaScript code that is used to manipulate data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
43
Q

A developer needs to provide a Visualforce page that lets users enter Product specific details during a Sales cycle.
How can this be accomplished?
Choose 2 answers
provide Product data entry.

A. Download a Managed Package from the AppExchange that provides a custom Visualforce page to modify.
B. Create a new Visualforce page and an Apex controller to provide Product data entry.
C. Copy the standard page and then make a Visualforce page for product data entry.
D. Download an Unmanaged Package from the AppExchange that provides a custom Visualforce page to modify.

A

B. Create a new Visualforce page and an Apex controller to provide Product data entry.

D. Download an Unmanaged Package from the AppExchange that provides a custom Visualforce page to modify.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
44
Q

A developer writes a before insert trigger.
How can the developer access the incoming records in the trigger body?

A. By accessing the Trigger.new context variable.
B. By accessing the Trigger.newRecords context variable.
C. By accessing the Trigger.newMap context variable.
D. By accessing the Tripper.newList context variable.

A

A. By accessing the Trigger.new context variable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
45
Q

A developer in a Salesforce org with 100 Accounts executes the following code using the Developer console:

Account myAccount = new Account(Name = ‘MyAccount’);
Insert myAccount;
For (Integer x = 0; x “less than” 250; x++)
Account newAccount = new Account (Name=’MyAccount’ + x);
try {
Insert newAccount;
}
catch (Exception ex) {
System.debug (ex) ;
}
insert new Account (Name=’myAccount’);

How many accounts are in the org after this code is run?
A. 101
B. 100
C. 102
D. 252
A

B. 100

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
46
Q

The Review_c object have a lookup relationship to the job_Application_c object. The job_Application_c object has a master detail relationship up to the position_c object. The relationship is based on the auto populated defaults?

What is the recommended way to display field data from the related Review _C records a Visualforce page for a single Position_c record?

Select one of the following:

A. Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Job_Application_c object to display Review_c data.

B. Utilize the Standard Controller for Position_c and a Controller Extension to query for Review_c data.

C. Utilize the Standard Controller for Position_c and expression syntax in the Page to display related Review_c through the Job_Applicacion_c inject.

D. Utilize the Standard Controller for Position_c and cross-object Formula Fields on the Review_c object to display Review_c data.

A

B. Utilize the Standard Controller for Position_c and a Controller Extension to query for Review_c data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
47
Q

What is a capability of the Force.com IDE?
Choose 2 answers

A. Roll back deployments.
B. Run Apex tests.
C. Download debug logs.
D. Edit metadata components.

A

B. Run Apex tests.

D. Edit metadata components.

Ref: https://developer.salesforce.com/page/Force.com_IDE

48
Q

Which code segment can be used to control when the dowork() method is called?

A. for (Trigger.isRunning t: Trigger.new)
{
dowork();
}
B. if(Trigger.isRunning)
dowork();
C. for (Trigger.isInsert t: Trigger.new)
{
dowork();
}
D. if(Trigger.isInsert)
dowork();
A

D. if(Trigger.isInsert)

dowork();

49
Q

When would a developer use a custom controller instead of a controller extension?
Choose 2 answers:

A. When a Visualforce page needs to replace the functionality of a standard controller.
B. When a Visualforce page does not reference a single primary object.
C. When a Visualforce page should not enforce permissions or field-level security.
D. When a Visualforce page needs to add new actions to a standard controller.

A

A. When a Visualforce page needs to replace the functionality of a standard controller.

C. When a Visualforce page should not enforce permissions or field-level security.

Ref: https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_def.htm

50
Q

What is a valid statement about Apex classes and interfaces?
Choose 2 answers:

A. The default modifier for a class is private.
B. Exception classes must end with the word exception.
C. A class can have multiple levels of inner classes.
D. The default modifier for an interface is private.
A

A. The default modifier for a class is private.

B. Exception classes must end with the word exception.

Ref: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_java_diffs.htm

51
Q

A developer has the following trigger that fires after insert and creates a child Case whenever a new Case is created.

List childCases = new List();
for (Case parent : Trigger.new){
Case child = new Case(ParentId = parent.Id, Subject = parent.Subject);
childCases.add(child);
}
insert childCases;

What happens after the code block executes?

A. Multiple child cases are created for each parent case in Trigger.new.
B. child case is created for each parent case in Trigger.new.
C. The trigger enters an infinite loop and eventually fails.
D. The trigger fails if the Subject field on the parent is blank.

A

C. The trigger enters an infinite loop and eventually fails.

52
Q

A Developer wants to create a custom object to track Customer Invoices.

How should Invoices and Accounts be related to ensure that all Invoices are visible to everyone with access to Account?

A. The Account should have a Lookup relationship to the Invoice.
B. The Invoice should have a Master -Detail relationship to the Account.
C. The Account should have a Master -Detail relationship to the Invoice.
D. The Invoice should have a Lookup relationship to the Account.

A

B. The Invoice should have a Master -Detail relationship to the Account.

Reasons:
It has to be master detail relationship to ensure that all child records are visible to everyone with access to Master(Account)
The Invoice should have a Master -Detail relationship to the Account ie. Account has to be master NOT the invoice

53
Q

What is a valid source and destination pair that can send or receive change sets?
Choose 2 answers:

A. Sandbox to production.
B. Developer edition to sandbox.
C. Developer edition to production.
D. Sandbox to sandbox.

A

A. Sandbox to production.

D. Sandbox to sandbox.

Reason:
There’s three basic combinations: production to sandbox, sandbox to sandbox, and sandbox to production. Any combination is allowed, so long as the orgs are configured to accept incoming change sets, and any sandboxes involved are created from the same production org.

54
Q

A developer needs to create records for the object Property__c .The developer creates the following code block:

01 List propertiesToCreate =helperClass.CreateProperties();
02 try {
03
04 } catch (Exception exp) {
05 //Exception handling
06 }

Which line of code would the developer insert at line 03 to ensure that at least some records are created, even if a record have errors and fails to be created?

A. Database.insert(propertiesToCreate, System.ALLOW_PARTIAL);
B. insert propertiesToCreate,
C. Database.insert(propertiesToCreate, false);
D. Database.insert(propertiesToCreate)

A

C. Database.insert(propertiesToCreate, false);

55
Q

When the number of record in a recordset is unknown, which control statement should a developer use to implement a set of code that executes for every record in the recordset, without performing a .size() or .length() method call?

A. For (init_stmt, exit_condition; increment_stmt) { }
B. Do { } While (Condition)
C. For (variable : list_or_set) { }
D. While (Condition) { … } 

A

C. For (variable : list_or_set) { }

56
Q

What is the result when a Visualforce page calls an Apex controller, which calls another Apex class, which then results in hitting a governor limit?

A. Any changes up to the error are saved.
B. Any changes up to the error are rolled back.
C. All changes before a savepoint are saved.
D. All changes are saved in the first Apex class.

A

B. Any changes up to the error are rolled back.

57
Q

A developer has the following code block:

public class PaymentTax {
public static decimal SalesTax = 0.0875;
}
trigger OpportunityLineItemTrigger on OpportunityLineItem (before insert, before update) {
PaymentTax PayTax = new PaymentTax();
decimal ProductTax = ProductCost * XXXXXXXXXXX;
}

To calculate the productTax, which code segment would a developer insert at the XXXXXXXXXXX to make the value the class variable SalesTax accessible within the trigger?

A. SalesTax
B. PayTax.SalesTax
C. PaymentTax.SalesTax
D. OpportunityLineItemTngger.SalesTax

A

C. PaymentTax.SalesTax

58
Q

On a Visualforce page with a custom controller, how should a developer retrieve a record by using an ID that is passed on the URL?

A. Use the constructor method for the controller.
B. Use the $Action.View method in the Visualforce page.
C. Create a new PageReference object with the Id.
D. Use the “apex:detail” tag in the Visualforce page.

A

A. Use the constructor method for the controller.

59
Q

A developer wrote a workflow email alert on case creation so that an email is sent to the case owner manager when a case is created.

When will the email be sent?

A. After Committing to database.
B. Before Committing to database. Calculator
C. Before Trigger execution.
D. After Trigger execution.

A

A. After Committing to database.

60
Q
A developer creates an Apex helper class to handle complex trigger logic.
How can the helper class warn users when the trigger exceeds DML governor limits?

A. By using ApexMessage.Message() to display an error message after the number of DML statements is exce€
B. By using Messaging.SendEmail() to continue the transaction and send an alert to the user after the number umL statements is exceed
C. By using PageReference.setRedirect() to redirect the user to a custom Visualforce page before the number DML statements is exceeded.
D. By using Limits.getDMLRows() and then displaying an error message before the number of DML statements exceeded.

A

D. By using Limits.getDMLRows() and then displaying an error message before the number of DML statements exceeded.

61
Q

Which user can edit a record after it has been locked for approval?

Choose 2 answers

A An administrator.
B. Any user who approved the record previously.
C. A user who is assigned as the current approver.
D. Any user- with a higher role in the hierarchy.

A

A An administrator.

C. A user who is assigned as the current approver.

62
Q

Which type of information is provided by the Checkpoints tab in the Developer Console?

Choose 2 answers

A. Exception
B. Debug Statement
C. Namespace
D. Time

A

C. Namespace

D. Time

Ref: https://help.salesforce.com/apex/HTViewHelpDoc?id=code_dev_console_tab_checkpoints.htm&language=en_US

63
Q

What is the proper process for an Apex Unit Test?

A. Query for test datapsing SeeAllData=true. Call the method being tested. Verify that the results are correct
B. Create data for testing. Execute runAllTests(). Verify that the results are correct.
C. Create data for testing. Call the method being tested. Verify that the results are correct.
D. Query for test data using SeeAllData=true. Execute runAllTests(). Verify that the results are correct.

A

C. Create data for testing. Call the method being tested. Verify that the results are correct.

64
Q

Which declarative method helps ensure quality data?
Choose 3 answers

A. Exception handling
B. Workflow alerts
C. Validation rules
D. Lookup filters
E. Page layouts
A

C. Validation rules

D. Lookup filters

E. Page layouts

65
Q

What is an accurate constructor for a custom controller named “MyController”?

A. public MyController () {
account = new Account () ;
}
B. public MyController (sObject obj) {
account = (Account) obj;
}
C. public MyController (List objects) {
accounts = (List ) objects;
}
D. public MyController (ApexPages.StandardController stdController) {
account = (Account) stdController.getRecord();
}
A

A. public MyController () {
account = new Account () ;
}

66
Q

A company wants a recruiting app that models candidates and interviews; displays the total number of interviews each candidate record; and defines security on interview records that is independent from the security on candidate records.
What would a developer do to accomplish this task?
Choose 2 answers

A. Create a roll -up summary field on the Candidate object that counts Interview records.
B. Create a master -detail relationship between the Candidate and Interview objects.
C. Create a lookup relationship between the Candidate and Interview objects.
D. Create a trigger on the Interview object that updates a field on the Candidate object.

A

C. Create a lookup relationship between the Candidate and Interview objects.

D. Create a trigger on the Interview object that updates a field on the Candidate object.

67
Q

What is a good practice for a developer to follow when writing a trigger?
Choose 2 answers

A. using the Map data structure to hold query results by ID.
B. Using @future methods to perform DML operations.
C. Using the set data structure to ensure distinct records.
D. Using synchronous callouts to call external systems

A

A. using the Map data structure to hold query results by ID.

C. Using the set data structure to ensure distinct records.

68
Q

Which code block returns the ListView of an Account object using the following debug statement?
system. debug (controller. getListViewOptions ( ) ) ;

A. ApexPages.StandardSetController controller = new
ApexPages.StandardSetController([SELECT Id FROM Account LIMIT 1]);
B. ApexPages.StandardController controller = new
ApexPages.StandardController(Database.getQueryLocator('select Id from Account Limit 1');
C. ApexPages.StandardController controller = new
ApexPages StandardController ( [SELECT Id FROM Account LIMIT 1));
D.ApexPages.StandardSetController controller = new
ApexPages.StandardSetController(Database.getQueryLocator('select Id from Account Limit 1');
A

D.ApexPages.StandardSetController controller = new

ApexPages.StandardSetController(Database.getQueryLocator(‘select Id from Account Limit 1’);

69
Q

Which data type or collection of data types can SOQL statements populate or evaluate to?
Choose 3 answers

A. A Boolean
B. An integer
C. A list of sObjects
D. A single sObject
E. A string
A

B. An integer
C. A list of sObjects
D. A single sObject

70
Q

Which action can a developer perform in a before update trigger?
Choose 2 answers

A. Update the original object using an update DML operation.
B. Delete the original object using a delete DML operation.
C. Change field values using the Trigger.new context variable.
D. Display a custom error message in the application interface.

A

C. Change field values using the Trigger.new context variable.

D. Display a custom error message in the application interface.

71
Q

Where can debug log filter settings be set?
Choose 2 answers

A. The Filters link by the monitored user’s name within the web UI.
B. The Show More link on the debug log’s record.
C. On the monitored user’s name.
D. The Log Filters tab on a class or trigger detail page.

A

B. The Show More link on the debug log’s record.

D. The Log Filters tab on a class or trigger detail page.

Ref:
http://help.salesforce.com/apex/HTViewHelpDoc?id=code_debug_log_classes.htm

72
Q
What is the value of x after the code segment executes?
String x = 'A';
Integer i = 10;
if(i "less than" 15 ){
i = 15;
x = 'B';
else if (i "less than" 20 ){
x = 'C';
}
else {
x = 'D';
}

A. B
B. C
C. D
D. A

A

A. B

73
Q

When can a developer use a custom Visualforce page in a Force.com application?
Choose 2 answers

A. To create components for dashboards and layouts.
B. To deploy components between two organizations.
C. To generate a PDF document with application data.
D. To modify the page layout settings for a custom object.

A

A. To create components for dashboards and layouts.

C. To generate a PDF document with application data.

74
Q

Which statement about the Lookup Relationship between a Custom Object and a Standard Object is correct?

A. The Lookup Relationship on the Custom Object can prevent the deletion of the Standard Object.
B. The Lookup Relationship cannot be marked as required on the page layout for the Custom Object.
C. The Custom Object will be deleted when the referenced Standard Object is deleted.
D. The Custom Object inherits security from the referenced Standard Objects

A

A. The Lookup Relationship on the Custom Object can prevent the deletion of the Standard Object.

Ref: https://help.salesforce.com/apex/HTViewHelpDoc?id=overview_of_custom_object_relationships.htm&language=en

75
Q

A reviewer is required to enter a reason in the comments field only when a candidate is recommended to be hired.
Which action can a developer take to enforce this requirement?

A. Create a required comments field.
B. Create a formula field.
C. Create a validation rule.
D. Create a required Visualforce component.

A

C. Create a validation rule.

76
Q

The Sales Management team hires a new intern. The intern is not allowed to view Opportunities, but needs to see the Most Recent Closed Date of all child Opportunities when viewing an Account record.
What would a developer do to meet this requirement?

A. Create a Workflow Rule on the Opportunity object that updates a field on the parent Account.
B. Create a formula field on the Account object that performs a MAX on the Opportunity Close Date field.
C. Create a roll-up summary field on the Account object that performs a MAX on the Opportunity Close Date field
D. Create a trigger on the Account object that queries the Close Date of the most recent Opportunities.

A

C. Create a roll -up summary field on the Account object that performs a MAX on the Opportunity Close Date field

77
Q

On which object can an administrator create a roll-up summary field?

A. Any object that is on the master side of a master-detail relationship.
B. Any object that is on the parent side of a lookup relationship.
C. Any object that is on the detail side of a master-detail relationship.
D. Any object that is on the child side of a lookup relationship.

A

A. Any object that is on the master side of a master-detail relationship.

78
Q

A Visualforce page has a standard controller for an object that has a lookup relationship to a parent object.
How can a developer display data from the parent record on the page?

A. By using SOQL on the Visualforce page to query for data from the parent record.
B. By using merge field syntax to retrieve data from the parent record.
C. By adding a second standard controller to the page for the parent record.
D. By using a roll-up formula field on the child record to include data from the parent record.

A

B. By using merge field syntax to retrieve data from the parent record.

79
Q

A developer needs to create a Visualforce page that will override standard Account edit button. The page will be used to validate the account’s address using a SOQL query. The page will also allow the user to make edits to the address.
Where would the developer write the Account address verification logic?

A. In a Controller Extension.
B. In a Custom Controller.
C. In a Standard Controller.
D. In a Standard Extension.

A

A. In a Controller Extension.

80
Q

A developer wants to list all of the Tasks for each Account on the Account detail page. When a Task is created for a Contact what does the developer need to do to display the Task on the related Account record?

A. Create an Account formula field that displays the Task information.
B. Nothing. The Task is automatically displayed on the Account page.
C. Create a Workflow Rule to relate the Task to the Contact’s Account.
D. Nothing. The Task cannot be related to an Account and a Contact.

A

B. Nothing. The Task is automatically displayed on the Account page.

81
Q

What is a capability of a StandardSetController?
Choose 2 answers

A. It extends the functionality of a standard or custom controller
B. It allows pages to perform mass updates of records.
C. It allows pages to perform pagination with large record sets.
D. It enforces field -level security when reading large record sets.

A

B. It allows pages to perform mass updates of records.

C. It allows pages to perform pagination with large record sets.

Ref: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_pages_standardsetcontroller.htm

82
Q

A developer has the following code.

try
{
List nameList;
Account a;
String s = a.Name;
nameList.add(s);
}
catch (ListException le)
{
System.debug('List Exception');
}
catch (NullPointerException npe)
{
System.debug('NullPointer Exception');
}
catch (Exception e)
{
System.debug('Generic Exception');
}
What message would be logged?
A. No message is logged
B. Generic Exception
C. List Exception
D. NullPointer Exception
A

D. NullPointer Exception

83
Q

Which statement about change set deployments is accurate?
Choose 3 answers

A. They can be used only between related organizations.
B. They require a deployment connection.
C. They use an all or none deployment model.
D They can be used to transfer Contact records.
E. They can be used to deploy custom settings data.

A

A. They can be used only between related organizations.

B. They require a deployment connection.

C. They use an all or none deployment model.

Ref:
https://help.salesforce.com/apex/HTViewHelpDoc?id=changesets_implementation_notes.htm&language=en_US

84
Q

How would a developer use Schema Builder to delete a custom field from the Account object that was required for prototyping but is no longer needed?

A. Remove all the references In the code and then the field will be removed from Schema Builder.
B. Remove all references from the code and then delete the custom field from Schema Builder.
C. Mark the field for deletion in Schema Builder and then delete it from the declarative UI.
D. Delete the field from Schema Builder and then all references in the code will be removed.

A

B. Remove all references from the code and then delete the custom field from Schema Builder.

85
Q

What is an accurate statement about variable scope?
Choose 3 answers

A. Sub -blocks cannot reuse a parent block’s variable name.
B. A variable can be defined at any point in a block.
C. Parallel blocks can use the same variable name.
D. Sub -blocks can reuse a parent block’s variable name if its value is null.
E. A static variable can restrict the scope to the current block if its value is null.

A

A. Sub -blocks cannot reuse a parent block’s variable name.

B. A variable can be defined at any point in a block.

C. Parallel blocks can use the same variable name.

86
Q

When the value of a field in an account record is updated, which method will update the value of custom field in related opportunities?
Choose 2 answers

A. An Apex trigger on the Account object.
B. A Process Builder on the Account object.
C. A cross-object formula field on the Account object.
D. A Workflow Rule on the Account object.

A

A. An Apex trigger on the Account object.

B. A Process Builder on the Account object.

87
Q
A developer creates an Apex class that includes private methods.
What can the developer do to ensure that the private methods can be accessed by the test class?

A. Add the TestVisible attribute to the Apex class.
B. Add the SeeAllData attribute to the test methods.
C. Add the SeeAllData attribute to the test class.
D. Add the TestVisible attribute to the Apex methods.

A

D. Add the TestVisible attribute to the Apex methods.

88
Q

Which scenario is invalid for execution by unit tests.

A. Executing methods for negative test scenario.
B. Executing methods as different users.
C. Loading test data in place of user input for Flows.
D. Load the standard Pricebook ID using a system method.

A

C. Loading test data in place of user input for Flows.

89
Q

A developer runs the following anonymous code block:
List acc = [SELECT Id FROM Account LIMIT 10];
Delete acc;
Database.emptyRecycleBin(acc);
system.debug(Limits.getDMLStatements()+’, ‘ +Limits.getLimitDMLStatements());
What is the result?

A. 11, 150
B. 150, 2
C. 150, 11
D. 2, 150

A

D. 2, 150

90
Q

Where can the custom roll-up summary fields be created using Standard Object relationships (Choose 3)

A. On Opportunity using Opportunity Product records.
B. On Account using Case records.
C. On Quote using Order records.
D. On Campaign using Campaign Member records.
E. On Account using Opportunity records.

A

A. On Opportunity using Opportunity Product records.

D. On Campaign using Campaign Member records.

E. On Account using Opportunity records.

91
Q

A developer has following query
Contact c = [SELECT Id, FirstName, LastName, Email FROM Contact WHERE LastName = ‘Smith’];
What does the query return if there is no Contact with the last name “Smith”?

A. A Contact with empty values.
B. A Contact initialized to null.
C. An empty List of Contacts.
D. An error that no rows are found.

A

D. An error that no rows are found.

92
Q

What is an important consideration when in a multi-tenant environment?

A. Polyglot persistance provides support for a global, multilingual user base in multiple orgs on multiple instances
B. Governor limits prevent tenants from impacting performance in multiple orgs on the same instance
C. Unique domain names takes the place of namespace for code developed for multiple orgs for multiple instances
D.Org-wide data security determines whether other tenants can see data in multiple orgs on the same inst

A

B. Governor limits prevent tenants from impacting performance in multiple orgs on the same instance
Ref:
https://developer.salesforce.com/page/Multi_Tenant_Architecture

93
Q

In the Lightning Component framework, which resource can be used to fire events?
Choose 2 answers

A. Visualforce controller options
B. Third-party web service code
C. Third-party Javascript code
D. Javascript controller actions

A

C. Third-party Javascript code

D. Javascript controller actions

Ref:
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/events_external.htm

94
Q

What is the capability of formula fields?
Choose 3 answers

A. Display the previous value for the field using the PRIORVALUE function.
B. Return and display a field value from another object using a VLOOKUP function.
C. Determine which of three different images to display using IF function.
D. Generate the link using the HYPERLINK function using a specific record in a legacy system.
E. Determine if a datetime field has passed using the NOW function.

A

C. Determine which of three different images to display using IF function.

D. Generate the link using the HYPERLINK function using a specific record in a legacy system.

E. Determine if a datetime field has passed using the NOW function.

Ref:
https://developer.salesforce.com/trailhead/en/point_click_business_logic/formula_fields

VLOOKUP only available in validation rules

95
Q

In a single record, a user selects multiple values from a multi-select picklist.
How are the selected values represented in Apex?

A. As a String with each value separated by a comma.
B. As a List with each value as a element in the list.
C. As a String with each value separated by semi colon.
D. As a Set with each value as a element in the set.

A

C. As a String with each value separated by semi colon.

96
Q

What is the capability of Force.com IDE?
Choose 2 answers

A. Edit metadata components
B. Run Apex tests
C. Run debug logs
D. Roll back deployments

A

A. Edit metadata components

B. Run Apex tests

Ref:
https://developer.salesforce.com/page/Force.com_IDE

97
Q

A Hierarchy Custom Setting stores a specific URL for each profile in Salesforce.
Which statement can a developer use to retrieve the correct URL for the current user’s profile and display this Visualforce Page?

A. {!$Setup.Url_Settings_c.Instance[Profile.Id].URL__c}
B. {!$Setup.Url_Settings_c.URL__c}
C. {!$Setup.Url_Settings_c[Profile.Id].URL__c}
D. {!$Setup.Url_Settings_c[$Profile.Id].URL__c}

A

B. {!$Setup.Url_Settings_c.URL__c}

98
Q

A developer writes a SOQL query to find child records for a specific parent
How many specific levels can be returned in a single query?

A.3
B.5
C.1
D.7

A

C. 1

99
Q

A developer needs to know if all tests currently pass in salesforce environment
Which feature can the developer use?
Choose 2 answers

A. Developer Console.
B. ANT Migration Tool
C. Salesforce UI Apex Test Execution
D. Workbench Metadata Retrieval

A

A. Developer Console.

C. Salesforce UI Apex Test Execution

100
Q

Which statement should a developer avoid using inside procedural loops?
Choose 2 answers

A. System.debug(‘Amount of CPU time (in ms) used so far: ‘ + Limits.getCpuTime());
B. update contactList;
C. List contacts = [select id, salutation, firstname, lastname, email from Contact where account =a.id;
D. if(o.accountid== aid)

A

B. update contactList;

C. List contacts = [select id, salutation, firstname, lastname, email from Contact where account =a.id;

101
Q

Which statement would a developer use when creating test data for products and pricebooks?

A.List objList = Test.loadData(Account.sObjectType,'myResource');
B.Pricebook pb= new Pricebook();
C.Id pricebookId=Test.getStandardPricebookId();
D.IsTest(SeeAllData=false);
A

C.Id pricebookId=Test.getStandardPricebookId();

102
Q

How can a developer determine from the DescribeSObjectResult if the current user will be able to create record an object in apex?

A By using the hasAccess() Method.
B. By using the isCreatable() method.
c. By using the isInsertable() method.
D. By using the canCreate() method.

A

B. By using the isCreatable() method.

Ref: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_sobject_describe.htm

103
Q

What is a valid statement about Apex classes and interfaces?
Choose 2 answers

A. Exception classes must end with the word exception.
B. A class can have multiple levels of inner classes.
C. The default modifier for a class is private.
D. The default modifier for an interface is private.
A

A. Exception classes must end with the word exception.

C. The default modifier for a class is private.

Ref:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_defining.htm

https://developer.salesforce.com/docs/atlas.en-us.apex_workbook.meta/apex_workbook/apex7_5.htm

104
Q

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 use to ensure that a user populates the Lead Source field prior to converting a Lead?

A. Process builder
B. Validation rule
C. Formula field
D. Workflow rule

A

B. Validation rule

105
Q

A developer created an Apex trigger using the Developer Console and now wants to debug code.
How can the developer accomplish this in the Developer Console?

A. Open the Logs tab in the Developer Console.
B. Select the Override Log Triggers checkbox for the trigger.
C. Add the user name in the Log Inspector.
D. Open the Progress tab in the Developer Console.

A

A. Open the Logs tab in the Developer Console.

106
Q

What are the supported content sources for custom buttons and links?
(Choose 2 Answers)

A. VisualForce Page.
B. Static Resource.
C. URL.
D. Chatter File.
E. Lightning Page.
A

A. VisualForce Page.

C. URL.

107
Q

What actions types should be configured to display a custom success message?

A. Update a record.
B. Post a feed item.
C. Delete a record.
D. Close a case.

A

A. Update a record.

108
Q

When creating a record with a Quick Action, what is the easiest way to post a feed item?

A. By selecting create case feed on the quick action.
B. By adding a trigger on the new record.
C. By adding a workflow rule on the new record.
D. By selecting create case feed on the new record.

A

A. By selecting create case feed on the quick action.

109
Q

What is the easiest way to verify a user before showing them sensitive content?

A. Sending the user a SMS message with a passcode.
B. Calling the generateVerificationUrl method in apex.
C. Sending the user an Email message with a passcode.
D. Calling the Session.forcedLoginUrl method in apex.

A

B. Calling the generateVerificationUrl method in apex.

110
Q

What features are available when writing apex test classes?
(Choose 2 Answers)

A. The ability to select error types to ignore in the developer console.
B. The ability to write assertions to test after a @future method.
C. The ability to set and modify the CreatedDate field in apex tests.
D. The ability to set breakpoints to freeze the execution at a given point.
E. The ability to select testing data using csv files stored in the system.

A

C. The ability to set and modify the CreatedDate field in apex tests.

E. The ability to select testing data using csv files stored in the system.

111
Q
public class myController {
public string myString;

public string getMyString(){
return ‘getMyString’;
}

public string getStringMethod1(){
return myString;
}

public string getStringMethod2(){
if(myString == null)
myString = 'Method2';
return myString;
}
}

{!MyString}, {!StringMethod1}, {!StringMethod2}, {!MyString}

What does the user see when accessing the custom page?

A. getMyString,
B. , , Method2,
C.Method2, getMyString
D. getMyString„ Method2, getMyString

A

D. getMyString„ Method2, getMyString

112
Q
Which is a valid way of loading external Javascript files into a VisualForce page?Choose 2 anwers
A. Using a script tag
B. Using a link tag
C. Using an apex:includeScript tag
D. Using an apex:define tag
A

A. Using a script tag

C. Using an apex:includeScript tag

113
Q

A developer needs to ensure there is sufficient test coverage for an Apex Method that interacts with Accounts. The developer needs to create test data.

What is the preferred way to load this test data into Salesforce?

A. By using Documents.
B. By using HttpCalloutMocks.
C. By using WebServiceTests.
D. By using Static Resources.

A

D. By using Static Resources.

114
Q

What is the benefit of the Lightning Component framework?

A. Better integration with Force.com sites.
B. More pre-built components to replicate the Salesforce look and feel.
C. More centralized control via server-side logic.
D. Better performance for custom Salesforce 1 Mobile apps.

A

B. More pre-built components to replicate the Salesforce look and feel.

115
Q

How would a developer determine if a CustomObject__c record has been manually shared with the current user in Apex?

A. By querying the role hierarchy.
B. By calling the isShared() method for the record.
C. By querying CustomObject__Share.
D. By calling the profile settings of the current user.

A

C. By querying CustomObject__Share.

116
Q

Where would a developer build a managed package?

A. Developer Sandbox
B. Unlimited Edition
C. Partial Copy Sandbox
D. Developer Edition

A

D. Developer Edition