Halloween Special Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: buysanta

Exact2Pass Menu

Question # 4

A Next Best Action strategy uses an Enhance element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors.

What is the correct definition of the Apex method?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 5

A developer created a child Lightning web component nested inside a parent Lightning web component. The parent component needs to pass a string value to the child component.

In which two ways can this be accomplished?

Choose 2 answers

A.

The parent component can use a public property to pass the data to the child component.

B.

The parent component can invoke a public method in the child component.

C.

The parent component can use a custom event to pass the data to the child component.

D.

The parent component can use the Apex controller class to send data to the child component.

Full Access
Question # 6

Which three resources in an Aura component can contain JavaScript functions? Choose 3 answers

A.

Renderer

B.

Controller

C.

style

D.

Helper

E.

Design

Full Access
Question # 7

Universal Containers decides to use purely declarative development to build out a new Salesforce application.

Which two options can be used to build out the business logic layer for this application?

Choose 2 answers

A.

Validation Rules

B.

Remote Actions

C.

Record-Triggered Flow

D.

Batch Jobs

Full Access
Question # 8

A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violations to the user.

How can the developer make sure that validation rule violations are displayed?

A.

Include on the Visualforce page.

B.

Use a try/catch with a custom exception class.

C.

Add custom controller attributes to display the message.

D.

Perform the DML using the patabase.upsert () method.

Full Access
Question # 9

Universal Containers has implemented an order management application. Each Order can have one or more Order Line items. The Order Line object is related to the Order via a master-detail relationship. For each Order Line item, the total price is calculated by multiplying the Order Line item price with the quantity ordered.

What is the best practice to get the sum of all Order Line item totals on the Order record?

A.

Quick action

B.

Apex trigger

C.

Roll-up summary field

D.

Formula field

Full Access
Question # 10

The following Apex method is part of the Contactservice class that is called from a trigger:

How should the developer modify the code to ensure best practices are met?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 11

What are two considerations for deploying from a sandbox to production? Choose 2 answers

A.

Should deploy during business hours to ensure feedback can be quickly addressed.

B.

All triggers must have at least one line of test coverage.

C.

least 75% of Apex code must be covered by unit tests.

D.

Unit tests must have calls to the System.assert method.

Full Access
Question # 12

An org has an existing flow that edits an Opportunity with an Update Records element. A developer must update the flow to also create a Contact and store the created Contact’s ID on the Opportunity.

Which update must the developer make in the flow?

A.

Add a new Update Records element.

B.

Add a new Get Records element.

C.

Add a new Roll Back Records element.

D.

Add a new Create Records element.

Full Access
Question # 13

Which three data types can a SOQL query return?

Choose 3 answers

A.

sObject

B.

Double

C.

Long

D.

List

E.

Integer

Full Access
Question # 14

A developer created a new after insert trigger on the Lead object that creates Task records for each Lead.

After deploying to production, an existing outside integration that inserts Lead records in batches to Salesforce is occasionally reporting total batch failures being caused by the Task insert statement. This causes the integration process in the outside system to stop, requiring a manual restart.

Which change should the developer make to allow the integration to continue when some records in a batch cause failure due to the Task insert statement, so that manual restarts are not needed?

A.

Deactivate the trigger before the integration runs.

B.

Remove the Apex class from the integration user's profile,

C.

Use a try-catch block after the insert statement,

D.

Use the Database method with allOrNone set to false.

Full Access
Question # 15

A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system. Within the class, the developer identifies the following method as a security threat:

What are two ways the developer can update the method to prevent a SOQL injection attack?

Choose 2 answers

A.

Use a regular expression expression on the parameter to remove special characters,

B.

Use the escapeSingleQuotes method to sanitize the parameter before its use.

C.

Use variable binding and replace the dynamic query with a static SOQL.

D.

Use the @Readonly annotation and the with sharing keyword on the class

Full Access
Question # 16

A credit card company needs to implement the functionality for a service agent to process damaged or stolen credit cards. When the customers call in, the service agent must gather many pieces of information. A developer is tasked to implement this functionality.

What should the developer use to satisfy this requirement in the most efficient manner?

A.

Screen-based flow

B.

Lightning Component

C.

Approval process

D.

Apex trigger

Full Access
Question # 17

A Salesforce administrator used Flow Builder to create a flow named "accountOnboarding". The flow must be used inside an Aura component.

Which tag should a developer use to display the flow in the component?

A.

lightning:flow

B.

aura-flow

C.

aura:flow

D.

lightning-flow

Full Access
Question # 18

If Apex code executes inside the =x=cuz=() method of an Apex class when implementing the Batchable interface, which two statements are true regarding governor limits?

Choose 2 answers

A.

The Apex governor limits are reset for each iteration of the execute () method.

B.

The Apex governor limits cannot be exceeded due to the asynchronous nature of the transaction.

C.

The Apex governor limits will use the asynchronous limit levels.

D.

The Apex governor limits are omitted while calling the constructor of the Apex class.

Full Access
Question # 19

A Developer Edition org has five existing accounts. A developer wants to add 10 more accounts for testing purposes.

The following code is executed in the Developer Console using the Execute Anonymous window:

How many total accounts will be in the org after this code Is executed?

A.

5

B.

6

C.

10

D.

15

Full Access
Question # 20

Considering the following code snippet:

When the code executes, a DML exception is thrown.

How should a developer modify the code to ensure exceptions are handled gracefully?

A.

Implement Change Data Capture,

B.

Implement a try/catch block for the DML.

C.

Implement the upsert DML statement.

D.

Remove null items from the list of Accounts.

Full Access
Question # 22

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

Choose 2 answers

A.

a method defined with the @tetestSetup annotation executes once for each test method in the test class and counts towards system limits.

B.

Records created in the test setup method cannot be updated in individualtest methods.

C.

In a test setup method, test data is inserted once and made available for all test methods in the test class.

D.

The ©testSetup annotation is not supported when the cg5lsTest(SeeAIIData=True) annotation is used.

Full Access
Question # 23

Universal Containers (UC) wants to lower its shipping cost while making the shipping process more efficient. The Distribution Officer advises UC to implement global

addresses to allow multiple Accounts to share a default pickup address. The developer is tasked to create the supporting object and relationship for this business requirement

and uses the Setup Menu to create a custom object called "Global Address".

Which field should the developer add to create the most efficient model that supports the business need?

A.

Add 2 master-detail field on the Account object to the Global Address object.

B.

Add a master-detail field on the Global Address object to the Account object.

C.

Add a lookup field on the Global Address object to the Account object.

D.

Add a lookup field on the Account object to the Global Address object.

Full Access
Question # 24

A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an Orderltem object that has a master-detail relationship to Order. During order processing, an order may be split into multiple orders.

What should a developer do to allow their code to move some existing Orderltem records to a new Order record?

A.

Create a junction object between OrderItem and Order.

B.

Select the Allow reparenting option on the master-detail relationship.

C.

Change the master-detail relationship to an external lookup relationship.

D.

Add without sharing to the Apex class declaration.

Full Access
Question # 25

A developer needs to allow users to complete a form on an Account record that will create record for a custom object.

The form needs to display different fields depending on the user’s job role. The functionality should only be available to a small group of users.

Which three things should the developer do to satisfy these requirements?

Choose 3 answers

A.

Create a Custom Permission for the users.

B.

Create a Lightning web component,

C.

Add a Dynamic Action to the Account Record Page.

D.

Add a Dynamic Action to the Users' assigned Page Layouts,

E.

Create a Dynamic Form.

Full Access
Question # 26

Since Aura application events follow the traditional publish- subscribe model, which method is used to fire an event?

A.

registerEvent

B.

fireEvent ()

C.

emit{)

D.

fire()

Full Access
Question # 27

What are two use cases for executing Anonymous Apex code?

Choose 2 answers

A.

To run a batch Apex class to update all Contacts

B.

To delete 15,000 inactive Accounts in a single transaction after a deployment

C.

To add unit test code coverage to an org

D.

To schedule an Apex class to run periodically

Full Access
Question # 28

A custom object Trainer_ < has a lookup field to another custom object cym__ c.

Which SOQL query will get the record for the Viridian City Gym and all it's trainers?

A.

SELECT Id; (SELECT Id FROM Trainers_r) FROM Gym_ _c WHERE Name = 'Viridian City Gym'

B.

SELECT Id, (SELECT Id FROM Trainer_c) FROM Gym__c WHERE Name = 'Viridian City Gym'

C.

SELECT ID FROM Trainer ¢ WHERE Gym__r.Name = 'Viridian City Gym'

D.

SELECT Id, (SELECT Id FROM Trainers_c) FROM Gym_c WHERE Name - 'Viridian City Gym’'

Full Access
Question # 29

team of developers is working on a source-driven project that allows them to work independently, with many different org configurations.

Which type of Salesforce orgs should they use for their development?

A.

Full Copy sandboxes

B.

Developer orgs

C.

Developer sandboxes

D.

Scratch orgs

Full Access
Question # 30

Universal Containers is building a recruiting app with an Applicant object that stores information about an individual person and a Job object that represents a job. Each applicant may apply for more than one job.

What should a developer implement to represent that an applicant has applied for a job?

A.

Master-detail field from Applicant to Job

B.

Junction object between Applicant and Job

C.

Formula field on Applicant that references Job

D.

Lookup field from Applicant to Job

Full Access
Question # 31

How should a developer write unit tests for a private method in An Apex class?

A.

Add a test method in the Apex class,

B.

Use the SeeAllData annotation.

C.

Use the @TestVisible annotation.

D.

Mark the Apex class as global.

Full Access
Question # 32

A team of many developers work in their own individual orgs that have the same configuration as the production org.

Which type of org is best suited for this scenario?

A.

Partner Developer Edition

B.

Developer Edition

C.

Developer Sandbox

D.

Full Sandbox

Full Access
Question # 33

Cloud Kicks has a multi-screen flow that its call center agents use when handling inbound service desk calls.

At one of the steps in the flow, the agents should be presented with a list order numbers and dates that are retrieved from an external order management system in real time and displayed on the screen.

What should a developer use to satisfy this requirement?

A.

An Apex controller

B.

An invocable method

C.

An outbound message

D.

An Apex REST class

Full Access
Question # 34

An Opportunity needs to have an amount rolled up from a custom object that is not in a master-detail relationship.

How can this be achieved?

A.

Use the Streaming API to create real-time roll-up summaries.

B.

Write a trigger on the child object and use an agaregate function to sum the amount for all related child objects under the Opportunity.

C.

Use the Metadata API to create real-time roll-up summaries,

D.

Write a trigger on the Opportunity object and use tree sorting to sum the amount for all related child objects under the Opportunity.

Full Access
Question # 35

A developer needs to have records with specific field values in order to test a new Apex class.

What should the developer do to ensure the data is available to the test?

A.

Use test.loadData() and reference a JSON file in Documents.

B.

Use Test.loadData() and reference a CSV file in a static resource.

C.

Use Anonymous Apex to create the required data.

D.

Use SOQL to query the org for the required data.

Full Access
Question # 36

A company has a custom object, order__ ¢, that has a required, unique external ID field called crder_number_c.

Which statement should be used to perform the DML necessary to insert new records and update existing records in a list of order_c records using the external ID field?

A.

merge orders;

B.

merge orders Order_Number_ c;

C.

upsert orders:

D.

upserrc orders Order Number_c;

Full Access
Question # 37

Universal Containers wants to automatically assign new cases to the appropriate support representative based on the case origin. They have created a custom field on the Case object to store the support

representative name.

What is the best solution to assign the case to the appropriate support representative?

A.

Use a validation rule on the Case object.

B.

Use an Assignment Flow element.

C.

Use a trigger on the Case object.

D.

Use a formula field on the Case object.

Full Access
Question # 38

What are two considerations for running a flow in debug mode? Choose 2 answers

A.

Clicking Pause or executing a Pause element closes the flow and ends debugging.

B.

Input variables of type record cannot be passed into the flow.

C.

DML operations will be rolled back when the debugging ends.

D.

Callouts to external systems are not executed when debugging a flow.

Full Access
Question # 39

A developer is creating an app that contains multiple Lightning web components.

One of the child components is used for navigation purposes. When a user clicks a button called Next in the child component, the parent component must be alerted so it can navigate to the next page.

How should this be accomplished?

A.

Update a property on the parent.

B.

Fire a notification.

C.

Create a custom event,

D.

Call a method in the Apex controller.

Full Access
Question # 40

A developer is asked to prevent anyone other than a user with Sales Manager profile from changing the Opportunity Status to Closed Lost if the lost reason is blank.

Which automation allows the developer to satisfy this requirement in the most efficient manner?

A.

An approval process on the Opportunity object

B.

A record trigger flow on the Opportunity object

C.

An Apex trigger on the Opportunity object

D.

An error condition formula on a validation rule on Opportunity

Full Access
Question # 41

Which scenario is valid for execution by unit tests?

A.

Load data from a remote site with a callout.

B.

Execute anonymous Apex as a different user,

C.

Generate a Visualforce PDF with getContentASPDF

D.

Set the created date of a record using a system method.

Full Access
Question # 42

A developer is creating a page that allows users to create multiple Opportunities. The developer is asked to verify the current user's default Opportunity record type, and set certain default values based on the record type before inserting the record.

How can the developer find the current user's default record type?

A.

Use Opportunity.SObjectType.gethescribe () .getRaecordlypaInsos () to get a list of record types, and iterate through them until 2sDefaultRecordTypeMapping () is true.

B.

Query the Profile where the ID equals uzexInfo.getProfilelD () and then use the profile.Cpportunity.gesDefaultRecordTyp= () method.

C.

Use the Schema.userInfo.Cpportunity.getlefaultRecordIype () method.

D.

Create the opportunity and check the opportunity. recordTyp=, which will have the record ID of the current user's default record type, before inserting.

Full Access
Question # 43

A developer created this Apex trigger that calls MyClass.myStaticMsthod:

The developer creates a test class with a test method that calls Myclass.myStacicMethod directly, resulting in 81% overall code coverage.

What happens when the developer tries to deploy the trigger and two classes to production, assuming no other code exists?

What happens when the developer tries to deploy the trigger and two classes to production, assuming no other code exists?

A.

The deployment falls because no assertions were made in the test method.

B.

The deployment passes because both classes and the trigger were included in the deployment.

C.

The deployment fails because the Apex trigger has no code coverage.

D.

The deployment passes because the Apex code has the required =75% code coverage.

Full Access
Question # 44

What should a developer do to check the code coverage of a class after running all tests?

A.

View the Class Test Percentage tab on the Apex Class list view in Salesforce Setup.

B.

View the code coverage percentage for the class using the Overall Code Coverage panel in the Developer Console Tests tab,

C.

View the Code Coverage column in the list view on the Apex Classes page.

D.

Select and run the class on the Apex Test Execution page in the Developer Console.

Full Access
Question # 45

A software company is using Salesforce to track the companies they sell their software to in the Account object. They also use Salesforce to track bugs in their software with a custom object, Bug__c.

As part of a process improvement initiative, they want to be able to report on which companies have reported which bugs. Each company should be able to report multiple bugs and bugs can also be reported by multiple companies.

What is needed to allow this reporting?

A.

Junction object between Bug_c and Account

B.

Master-detail field on Bug__c to Account

C.

Lookup field on sug_c to Account

D.

Roll-up summary field of Bug__c on Account

Full Access
Question # 46

A developer created a Visualforce page and custom controller to display the account type field as shown below.

Custom controller code:

Visualforce page snippet:

what should the developer do to correct the problem?

A.

Add a getter method for the attribute.

B.

Convert theAccount.Type to a String.

C.

Change theAccount attribute to public.

D.

Add with sharing to the custom controller.

Full Access
Question # 47

What should a developer use to script the deployment and unit test execution as part of continuous integration?

A.

VS Code

B.

Developer Console

C.

Execute Anonymous

D.

Salesforce CLI

Full Access
Question # 48

A Primaryid__c custom field exists on the candidate_ c custom object. The field is used to store each candidate's id number and is marked as Unique in the schema definition.

As part of a data enrichment process, Universal Containers has a CSV file that contains updated data for all candidates in the system. The file contains each Candidate's primary id as a data point. Universal Containers wants to upload this information into Salesforce, while ensuring all data rows are correctly mapped to a candidate in the system.

Which technique should the developer implement to streamline the data upload?

A.

Create a before Insert trigger to correctly map the records.

B.

Create a before save flow to correctly map the records.

C.

Update the PrimaryId__ c field definition to mark it as an External Id.

D.

Upload the CSV into a custom object related to Candidate__ c.

Full Access
Question # 49

While working in a sandbox, an Apex test fails when run in the Test Runner. However, executing the Apex logic in the Execute Anonymous window succeeds with no exceptions or errors. Why did the method fail in the sandbox test framework but succeed in the Developer Console?

A.

The test method is calling an @future method.

B.

The test method relies on existing data in the sandbox.

C.

The test method has a syntax error in the code.

D.

The test method does not use Sysetem.runas= to execute as a specific user.

Full Access
Question # 50

Which two are best practices when it comes to Aura component and application event handling?

Choose 2 answers

A.

Try to use application events as opposed to component events.

B.

Use component events to communicate actions that should be handled at the application level.

C.

Handle low-level events in the event handler and re-fire them as higher-level events.

D.

Reuse the event logic in a component bundle, by putting the fogic in the helper.

Full Access
Question # 51

An Apex method, getAccounts, that returns a list of Accounts given a searchTerm, is available for Lightning Web Components to use.

What is the correct definition of a Lightning Web Component property that uses the getAccounts method?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 52

Which two characteristics are true for Lightning Web Component custom events? Choose 2 answers

A.

Data may be passed in the payload of a custom event using a property called detail.

B.

By default a custom event only propagates to its immediate container and to its immediate child component.

C.

Data may be passed in the payload of a custom event using @wire decorated properties.

D.

By default a custom event only propagates to its immediate container.

Full Access