Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: netdisc

Salesforce CRT-450 Salesforce Certified Platform Developer I (SU22) Exam Practice Test

Demo: 55 questions
Total 372 questions

Salesforce Certified Platform Developer I (SU22) Questions and Answers

Question 1

Which two number expressions evaluate correctly? (Choose two.)

Options:

A.

Double d = 3.14159;

B.

Integer I = 3.14159;

C.

Decimal d = 3.14159;

D.

Long l = 3.14159;

Question 2

For which three items can a trace flag be configured? (Choose three.)

Options:

A.

Apex Trigger

B.

Apex Class

C.

Process Builder

D.

User

E.

Visualforce

Question 3

Universal Containers wants Opportunities to be locked from editing when reaching the Closed/Won stage.

Which two strategies should a developer use to accomplish this? (Choose two.)

Options:

A.

Use a Visual Workflow.

B.

Use a validation rule.

C.

Use the Process Automation Settings.

D.

Use a Trigger.

Question 4

The operation manager at a construction company uses a custom object called Machinery to manage the usage and maintenance of its cranes and other machinery. The manager wants to be able to assign machinery to different constructions jobs, and track the dates and costs associated with each job. More than one piece of machinery can be assigned to one construction job.

What should a developer do to meet these requirements?

Options:

A.

Create a lookup field on theConstruction Job object to the Machinery object.

B.

Create a lookup field on the Machinery object to the Construction Job object.

C.

Create a junction object with Master-Detail Relationship to both the Machinery object and the Construction Job object.

D.

Create a Master-Detail Lookup on the Machinery object to the Construction Job object.

Question 5

A Visualforce page is required fordisplaying and editing Case records that includes both standard and custom functionality defined in an Apex class called myControllerExtension.

The Visualforce page should include which attribute(s) to correctly implement controller functionality?

Options:

A.

controller=“Case” and extensions=“myControllerExtension”

B.

extensions=“myControllerExtension”

C.

controller=“myControllerExtension”

D.

standardController=“Case” and extensions=“myControllerExtension”

Question 6

How should a developer avoidhitting the governor limits in test methods?

Options:

A.

Use @TestVisible on methods that create records.

B.

Use Test.loadData() to load data from a static resource.

C.

Use @IsTest (SeeAllData=true) to use existing data.

D.

Use Test.startTest() to reset governor limits.

Question 7

How should a developer make sure that a child record on a custom object, with a lookup to the Account object, has the same sharing access as its associated account?

Options:

A.

Create a Sharing Rule comparing the custom object owner to the account owner.

B.

Create a validation rule on the custom object comparing the record owners on both records.

C.

Include the sharing related list on the custom object page layout.

D.

Ensure that the relationship between the objects is Master-Detail.

Question 8

What is the requirement for a class to be used as a custom Visualforce controller?

Options:

A.

Any top-level Apex class that has a constructor that returns a PageReference

B.

Any top-level Apex class that extends a PageReference

C.

Any top-level Apex class that has a default, no-argument constructor

D.

Any top-level Apex class that implements the controller interface

Question 9

When is an Apex Trigger required instead of a Process Builder Process?

Options:

A.

When a record needs to be created

B.

When multiple records related to the triggering record need to be updated

C.

When a post to Chatter needs to be created

D.

When an action needs to be taken on a delete or undelete, or before a DML operation is executed.

Question 10

Why would a developer consider using a custom controller over a controller extension?

Options:

A.

Toincrease the SOQL query governor limits.

B.

To implement all of the logic for a page and bypass default Salesforce functionality

C.

To leverage built-in functionality of a standard controller

D.

To enforce user sharing settings and permissions

Question 11

Which three tools can deploy metadata to production? (Choose three.)

Options:

A.

Change Set from Developer Org

B.

Force.com IDE

C.

Data Loader

D.

Change Set from Sandbox

E.

Metadata API

Question 12

When an Account’s custom picklist field called Customer Sentiment is changed to a value of “Confused”, a new related Case should automatically be created.

Which two methods should a developer use to createthis case? (Choose two.)

Options:

A.

Process Builder

B.

Apex Trigger

C.

Custom Button

D.

Workflow Rule

Question 13

Which approach should be used to provide test data for a test class?

Options:

A.

Query for existing records in the database.

B.

Execute anonymous code blocks that create data.

C.

Use a test datafactory class to create test data.

D.

Access data in @TestVisible class variables.

Question 14

A newly hireddeveloper discovers that there are multiple triggers on the case object.

What should the developer consider when working with triggers?

Options:

A.

Developers must dictate the order of trigger execution.

B.

Trigger execution order is based on creation date and time.

C.

Unit tests must specify the trigger being tested.

D.

Trigger execution order is not guaranteed for the same sObject.

Question 15

A developer needs to create a Visualforce page that displays Case data.The page will be used by both support reps and support managers. The Support Rep profile does not allow visibility of the Customer_Satisfaction__c field, but the Support Manager profile does.

How can the developer create the page to enforce Field Level Security and keep future maintenance to a minimum?

Options:

A.

Create one Visualforce Page for use by both profiles.

B.

Use a new Support Manager permission set.

C.

Create a separate Visualforce Page for each profile.

D.

Use a custom controller that has the withsharing keywords.

Question 16

Which two strategies should a developer use to avoid hitting governor limits when developing in a multi-tenant environment? (Choose two.)

Options:

A.

Use collections to store all fields from a related object and not just minimally required fields.

B.

Use methods from the “Limits” class to monitor governor limits.

C.

Use SOQL for loops to iterate data retrieved from queries that return a high number of rows.

D.

Use variables within Apex classes to store large amounts of data.

Question 17

A developer working on a time management application wants to make total hours for each timecard available to application users. A timecard entry has a Master-Detail relationship to a timecard.

Which approach should the developer use to accomplish this declaratively?

Options:

A.

A Visualforce page that calculates the total number of hours for a timecard and displays it on the page

B.

A Roll-Up Summary field on the TimecardObject that calculates the total hours from timecard entries for that timecard

C.

A Process Builder process that updates a field on the timecard when a timecard entry is created

D.

An Apex trigger that uses an Aggregate Query to calculate the hours for agiven timecard and stores it in a custom field

Question 18

Where can a developer identify the time taken by each process in a transaction using Developer Console log inspector?

Options:

A.

Performance Tree tab under Stack Tree panel

B.

Execution Tree tab under Stack Tree panel

C.

Timeline tab under Execution Overview panel

D.

Save Order tab under Execution Overview panel

Question 19

How should a developer prevent a recursive trigger?

Options:

A.

Use a “one trigger per object” pattern.

B.

Use a static Boolean variable.

C.

Use a trigger handler.

D.

Use a private Boolean variable.

Question 20

Which approach should a developer take to automatically add a “Maintenance Plan” to each Opportunity that includes an “Annual Subscription” when an opportunity is closed?

Options:

A.

Build a OpportunityLineItem trigger that adds a PriceBookEntry record.

B.

Build an OpportunityLineItem trigger to add an OpportunityLineItem record.

C.

Build an Opportunity trigger that adds a PriceBookEntry record.

D.

Build an Opportunity trigger that adds an OpportunityLineItem record.

Question 21

A method is passed a list of generic sObjects as a parameter.

What should the developer do to determine which object type (Account, Lead, or Contact, for example) to cast each sObject?

Options:

A.

Use the first three characters of the sObject ID to determine the sObject type.

B.

Use the getSObjectType method on each generic sObject to retrieve the sObject token.

C.

Use the getSObjectName method on the sObject class to get the sObject name.

D.

Use a try-catch construct to cast the sObject into one of the three sObject types.

Question 22

A developer created a Lightning component to display a short text summary for an object and wants to use it with multiple Apex classes.

How should the developer design the Apex classes?

Options:

A.

Have each class define method getObject() that returns the sObject that is controlled by the Apex class.

B.

Extendeach class from the same base class that has a method getTextSummary() that returns the summary.

C.

Have each class implement an interface that defines method getTextSummary() that returns the summary.

D.

Have each class define method getTextSummary() that returns the summary.

Question 23

A platform developer at Universal Containers needs to create a custom button for the Account object that, when clicked, will perform a series of calculations and redirect the user to a custom Visualforce page.

Which three attributes need to be defined with values in the tag to accomplish this? (Choose three.)

Options:

A.

action

B.

renderAs

C.

standardController

D.

readOnly

E.

extensions

Question 24

What are three characteristics of static methods? (Choose three.)

Options:

A.

Initialized only when a class is loaded

B.

A staticvariable outside of the scope of an Apex transaction

C.

Allowed only in outer classes

D.

Allowed only in inner classes

E.

Excluded from the view state for a Visualforce page

Question 25

Which two statements are true about using the @testSetup annotation in an Apex test class? (Choose two.)

Options:

A.

The @testSetup annotation cannot be used whenthe @isTest(SeeAllData=True) annotation is used.

B.

Test data is inserted once for all test methods in a class.

C.

Records created in the @testSetup method cannot be updates in individual test methods.

D.

The @testSetup method is automatically executed before each test method in the test class is executed.

Question 26

What are two uses for External IDs? (Choose two.)

Options:

A.

To create relationships between records imported from an external system.

B.

To create a record in a development environment with the same Salesforce ID as in another environment

C.

To identify the sObject type in Salesforce

D.

To prevent an importfrom creating duplicate records using Upsert

Question 27

While writing a test class that covers an OpportunityLineItem trigger, a Developer is unable to create a standard PriceBook since one already exists in the org.

How should the Developer overcome this problem?

Options:

A.

Use Test.getStandardPricebookId() to get the standard PriceBook ID.

B.

Use @IsTest(SeeAllData=true) and delete the existing standard PriceBook.

C.

Use Test.loadData() and a Static Resource to load a standard Pricebook.

D.

Use @TestVisible to allow the test method to see the standard PriceBook.

Question 28

What is a benefit of using an after insert trigger over using a before insert trigger?

Options:

A.

An after insert trigger allows a developer to bypass validation rules when updating fields on the new record.

B.

An afterinsert trigger allows a developer to insert other objects that reference the new record.

C.

An after insert trigger allows a developer to make a callout to an external service.

D.

An after insert trigger allows a developer to modify fields in the new record without a query.

Question 29

A developer created a Visualforce page with a custom controller to show a list of accounts. The page uses the component, with a variable called "selection", to show the valid values for Account.Type. The page uses an component to display the list of accounts, where the iteration variable is "acct". The developer wants to ensure that when a user selects a type on the component, only accounts with that type are shown on the page. What should the developer do to accomplish this?

Options:

A.

Use the onChange event to update the list of accounts inthe controller when the value changes, and then re-render the pageBlockTable.

B.

Create multiple lists in the controller that represent the relevant accounts for each account type when the page loads, then reference the correct one dynamically on the pageBlockTable.

C.

Add the Rendered={!Acct.type==selection} attribute to the pageBlockTable component

D.

Create a component for each option and use a variable with hide parameter on the element.

Question 30

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

Options:

A.

Apex class

B.

Adobe Flash

C.

JavaScript

D.

Documentation

Question 31

A developer needs to find information about @future methods that were invoked. From which system monitoring feature can the developer see this information?

Options:

A.

Scheduled jobs

B.

Apex Jobs

C.

Background Jobs

D.

Asynchronous Jobs

Question 32

Universal Containers requires Service Representatives to update all Cases at least one every three days. To make sure of this policy is obeyed, a developer has been asked to implement a field thatdisplays the number of days since the last Case update. What should the developer use to configure the solution?

Options:

A.

Formula field

B.

Workflow rule

C.

Process Builder

D.

Scheduled Apex Class

Question 33

A developer uses a test setup method to create an account named 'test'. The first method deletes the account record. What must be done in the second test method to use the account?

Options:

A.

Use select id from account where name='test'

B.

Restore the account using an undelete statement

C.

Call the test setup method at the start of the test

D.

The account cannot be used in thesecond method

Question 34

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 iscausing the code block to fail?

Options:

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 abefore insert trigger cannot be updated.

Question 35

A developer has the following class and trigger code public class insurancerates{ public static final decimal smokercharge = 0.01; } trigger contacttrigger on contact (before insert){ insurancerates rates = new insurancerates(); decimal basecost=xxx; } Which code segment should a developer insert at the xxx to set the basecost variable to the value of the class variable smokercharge?

Options:

A.

Rates.smokercharge

B.

Contacttrigger.insurancerates.smokercharge

C.

Insurancerates.smokercharge

D.

Rates.getsmokercharge()

Question 36

What can a developer use to determineif the core Apex code exceeds any governor limits in a test class during bulk execution?

Options:

A.

Limits, startTest, stopTest

B.

Test.getDmlStatements()

C.

@TestSetup.

D.

@TestVisible

Question 37

Which twocomponents are available to deploy using the METADATA API? Choose 2 answers

Options:

A.

Web-to-Case

B.

Lead Conversion Settings

C.

Case Settings

D.

Web-to-Lead

Question 38

Which type of code represents the Controller in MVC architecture on the Force.com platform? (Choose 2)

Options:

A.

JavaScript that is used to make a menu item display itself.

B.

A static resource that contains CSS andimages.

C.

Custom Apex and JavaScript coda that is used to manipulate data.

D.

StandardController system methods that are referenced by Visualforce.

Question 39

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

Options:

A.

Id pricebookId = Test.getStandardPricebookId();

B.

Pricebook pb = new Pricebook();

C.

IsTest(SeeAllData = false);

D.

List objList = Test.loadData(Account.sObjectType, 'myResource');

Question 40

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?

Options:

A.

Add the TestVisible attribute to the Apex class

B.

Add the SeeAllData attribute to the test methods.

C.

Add the TestVisible attribute to the apex methods.

D.

Add the SeeAllData attribute to the test class

Question 41

Adeveloper 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?

Options:

A.

Nothing. The task is automatically displayed on the Account page.

B.

Nothing. The Task cannot be related to an Account and a Contact.

C.

Create a Workflow rule to relate the Task to the Contact's Account.

D.

Create an Account formula field that displays the Task information.

Question 42

A developer has the 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'?

Options:

A.

A contact initializedto null.

B.

An error that no rows are found.

C.

An empty List of Contacts.

D.

A Contact with empty values.

Question 43

What is true for a partial sandbox that is not true for a full sandbox? Choose 2 answers:

Options:

A.

More frequent refreshes.

B.

Only Includes necessary metadata.

C.

Use of change sets.

D.

Limited to 5 GB of data.

Question 44

A company wants to create an employee rating program that allows employees torate each other. An employee's average rating must be displayed on the employee record. Employees must be able to create rating records, but are not allowed to create employee records. Which two actions should a developer take to accomplish this task? choose 2 answers

Options:

A.

Create a master-detail relanstionship between the rating and employee object

B.

Create a trigger on the rating object that updates a field on the employee object

C.

Create a roll-up sumary field on the employee and use avg to calculate the average rating score

D.

Create a lookup realntionship beteween the rating and employee object

Question 45

A developer wants to display all ofthe 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

Options:

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.

Question 46

A developer is creating an enhancement to an application that will allow people to be related to their employer. Which data model provides the simplest solution to meetthe requirements?

Options:

A.

Create a lookup realtionship to indicate that a person has an employer

B.

Create a master-detail relationship to indicate that a person has an employer

C.

Create a junction object to relate many people to many through master-detailrelationship

D.

Create a junction object to relate many people to many through lookup relationship

Question 47

What is true of a partial sandbox that is not true of a full sandbox? Choose 2 answers

Options:

A.

More frequent refreshes

B.

Limited to 5 GB of data

C.

Use of change sets

D.

Only includes necessary meta data

Question 48

What is the result of the following code block ?

Integer x = 1;Integer Y = 0;While(x < 10){Y++;}

Options:

A.

An error occurs

B.

Y = 9

C.

Y = 10

D.

X = 0

Question 49

Where would a developer build a managed package?

Options:

A.

Developer Sandbox

B.

Unlimited Edition

C.

Partial Copy Sandbox

D.

Developer Edition

Question 50

A developer needs to provide a way to mass edit, update, and delete records from a list view. In which two ways can this be accomplished? Choose 2 answers

Options:

A.

Create a new Visualforce page and Apex Controller for the list view that provides mass edit, update and delete functionality.

B.

Configure the user interface and enable both inline editing and enhanced lists.

C.

Download an unmanaged package from the AppExchange that provide customizable mass edit, update, and delete functionality.

D.

Download a managed package from the AppExchange that provides customizable Enhanced List Views and buttons

Question 51

Which three resources in a Lightning Component Bundle can containJavaScript functions? Choose 3

Options:

A.

Renderer

B.

Design

C.

Helper

D.

Controller

E.

Style

Question 52

Given the code block: Integer x; For(x=0;x<10; x+=2) { If(x==8) break; If(x==10) break; } System.debug(x); Which value will the system debugstatement display?

Options:

A.

2

B.

10

C.

8

D.

4

Question 53

How can a developer get all of the available record types for the current user on the case object?

Options:

A.

Use SOQL to get all cases

B.

Usedescribesobjectresult of the case object

C.

Use case.getrecordtypes()

D.

Use describefieldresult of the case.recordtype field

Question 54

Which declarative method helps ensure quality data? (Choose 3)

Options:

A.

Validation Rules

B.

Workflow alerts

C.

Exception Handling

D.

Lookup Filters

E.

Page Layouts

Question 55

What can a Lightning Component contain in its resource bundle? Choose 2 answer

Options:

A.

Custom client side rendering behavior.

B.

Build scripts for minification

C.

Properties files with global settings

D.

CSS styles scoped to the component

Demo: 55 questions
Total 372 questions