Winter Sale Special 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: ex2p65

Exact2Pass Menu

Question # 4

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 # 5

What can be easily developed using the Lightning Component framework?

A.

Salesforce Classic user Interface pages

B.

Lightning Pages

C.

Salesforce integrations

D.

Customized JavaScript buttons

Full Access
Question # 6

Consider the following code snippet for a Visualforce page that is launched using a Custom Button on the Account detail page layout.

When the Save button is pressed the developer must perform a complex validation that involves multiple objects and, upon success, redirect the user to another Visualforce

page.

What can the developer use to meet this business requirement?

A.

Controller extension

B.

Custom controller

C.

Apex trigger

D.

Validation rule

Full Access
Question # 7

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 # 8

A developer wants to improve runtime performance of Apex calls by caching results on the client.

What is the most efficient way to implement this and follow best practices?

A.

Call the setStorable () method on the action in the JavaScript client-side code.

B.

Set a cookie in the browser for use upon return to the page.

C.

Decorate the server-side method with @AuraEnsbled(storable=true).

D.

Decorate the server-side method with @AuraZnabled(cacheable=true).

Full Access
Question # 9

When using Salesforce DX, what does a developer need to enable to create and manage scratch orgs?

A.

Dev Hub

B.

Production

C.

Environment Hub

D.

Sandbox

Full Access
Question # 10

Universal Containers needs to create a custom user interface component that allows users to enter information about their accounts. The component should be able to validate the user input before saving the information to the database.

What is the best technology to create this component?

A.

Lightning Web Components

B.

Visualforce

C.

Flow

D.

VUE JavaScript framework

Full Access
Question # 11

Universal Containers recently transitioned from Classic to Lightning Experience.

One of its business processes requires certain values from the Opportunity cbject to be sent via an HTTP REST callout to its external order management system when the user presses a custom button

on the Opportunity detail page. Example values are as follows:

* Name

* Amount

* Account

Which two methods should the developer implement to fulfill the business requirement?

Choose 2 answers

A.

Create a Remote Action on the Opportunity object that executes an Apex immediate action to perform the HTTP REST callout whenever the Opportunity Is updated.

B.

Create a custom Visualforce quick action that performs the HTTP REST callout, and use a Visualforce quick action to expose the component on the Opportunity detail page.

C.

Create a Lightning component quick action that performs the HTTP REST callout, and use a Lightning Action to expose the component on the Opportunity detail page.

D.

Create an after update trigger on the Opportunity object that calls a helper method using @Future (Callour=true) to perform the HTTP REST callout.

Full Access
Question # 12

Universal Containers (UC) uses out-of-the-box order management, that has a Master-Detail relationship between Order and Order Line Item.

UC stores the availability date on each Order Line Item and Orders are only shipped when all of the Order Line Items are available.

Which method should be used to calculate the estimated ship date for an Order?

A.

Use a MAX Roll-Up Summary field on the latest availability date fields.

B.

Use a CEILING formula on each of the latest availability date fields.

C.

Use a LATEST formula on each of the latest availability date fields.

D.

Use a DAYS formula on each of the availability date fields and a COUNT Roll-Up Summary field on the Order.

Full Access
Question # 13

What Is the result of the following code snippet?

A.

Accounts are inserted.

B.

Account is inserted.

C.

200 Accounts are inserted,

D.

201 Accounts are inserted.

Full Access
Question # 14

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 # 15

For which three items can a trace flag be configured? Choose 3 answers

A.

Visualforce

B.

Apex Trigger

C.

Apex Class

D.

Flow

E.

User

Full Access
Question # 16

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 # 17

A developer needs to make a custom Lightning Web Component available in the Salesforce Classic user interface. Which approach can be used to accomplish this?

A.

Embed the Lightning Web Component is a Visualforce Component and add directly to the page layout.

B.

Wrap the Lightning Web Component in an Aura Component and surface the Aura Component as a Visualforce tab.

C.

Use a Visualforce page with a custom controller to invoke the Lightning Web Component using a call to an Apex method.

D.

Use the Lightning Out JavaScript library to embed the Lightning Web Component in a Visualforce page and add to the page layout.

Full Access
Question # 18

What Is the result of the following code?

A.

The record will not be created and an exception will be thrown.

B.

The record will be created and no error will be reported,

C.

The record will not be created and no error will be reported.

D.

The record will be created and a message will be in the debug log.

Full Access
Question # 19

Managers at Universal Containers want to ensure that only decommissioned containers are able to be deleted in the system. To meet the business requirement a Salesforce developer adds "Decommissioned” as a picklist value for the status__c custom field within the Container__c object.

Which two approaches could a developer use to enforce only Container records with a status of "Decommissioned” can be deleted?

Choose 2 answers

A.

Apex trigger

B.

validation rule

C.

After record-triggered flow

D.

Before record-triggered flow

Full Access
Question # 20

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 # 21

Which two settings must be defined in order to update a record of a junction object? Choose 2 answers

A.

Read/Write access on the primary relationship

B.

Read/Write access on the secondary relationship

C.

Read/Write access on the junction object

D.

Read access on the primary relationship

Full Access
Question # 22

A developer created a trigger on the Account object and wants to test if the trigger is properly bulkified. The developer team decided that the trigger should be tested with 200 account records with unique names.

What two things should be done to create the test data within the unit test with the least amount of code?

Choose 2 answers

A.

Use Test.loadData to populate data in your test methods.

B.

Create a static resource containing test data.

C.

Use the @isTest (isParallel=true) annotation in the test class.

D.

Use the @isTest (seeAllData=true) annotation in the test class.

Full Access
Question # 23

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

Which three options should be used to build out the database layer for the application?

Choose 3 answers

A.

Roll-up summaries

B.

Flows

C.

Custom objects and fields

D.

Relationships

E.

Triggers

Full Access
Question # 24

A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of tests allowing them to test independent requirements for various types of Salesforce Cases.

Which approach can efficiently generate the required data for each unit test?

A.

Use @TestSetup with a void method.

B.

Create test data before Test.startTest {} in the unit test,

C.

Add @TsTest (seeAllData=true) at the start of the unit test class.

D.

Create a mock using the Stub API.

Full Access
Question # 25

What are three capabilities of the tag when loading JavaScript resources in Aura components?

Choose 3 answers

A.

Specifying loading order

B.

One-time loading for duplicate scripts

C.

Loading files from Documents

D.

Loading externally hosted scripts

E.

Loading scripts in parallel

Full Access
Question # 26

Universal Containers implemented a private sharing model for the Account object. A custom Account search tool was developed with Apex to help sales representatives find accounts that match multiple criteria they specify. Since its release, users of the tool report they can see Accounts they do not own.

What should the developer use to enforce sharing permissions for the currently logged in user while using the custom search tool?

A.

Use the schema describe calls to determine if the logged-in user has access to the Account object,

B.

Use the with sharing keyword on the class declaration.

C.

Use the without sharing keyword on the class declaration.

D.

Use the UserInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user.

Full Access
Question # 27

Which annotation exposes an Apex class as a RESTful web service?

A.

@HttpInvocable

B.

@RemoteAction

C.

@RestResource (urlMapping="'/mySexrvice/*')

D.

@AuraEnabled(cacheable=true)

Full Access
Question # 28

Which two are phases in the Aura application event propagation framework?

Choose 2 answers

A.

Bubble

B.

Control

C.

Default

D.

Emit

Full Access
Question # 29

How is a controller and extension specified for a custom object named "Notice" on a Visualforce page?

A.

apex:page controller="Notice_ c" extensions="myControllerExtension”

B.

apax:page=Notice extends="myControllerExtension’’

C.

apax:page controllers="Norice &£, myConrrollerExtansicon™

D.

apex:page standardController="Notice__c" extensions="myConctrollerExtension”

Full Access
Question # 30

A developer Is designing a new application on the Salesforce platform and wants to ensure it can support multiple tenants effectively.

Which design framework should the developer consider to ensure scalability and maintainability?

A.

Agile Development

B.

Model-View-Controller (MVC)

C.

Flux (view, action, dispatcher, and store)

D.

Waterfall Model

Full Access
Question # 31

Universal Containers has developed custom Apex code and Lightning Components in a Sandbox environment. They need to deploy the code and associated configurations to the Production environment.

What is the recommended process for deploying the code and configurations to Production?

A.

Use the Force.com IDE to deploy the Apex code and Lightning Components.

B.

Use the Ant Migration Tool to deploy the Apex code and Lightning Components.

C.

Use a change set to deploy the Apex code and Lightning Components.

D.

Use Salesforce CLI to deploy the Apex code and Lightning Components.

Full Access
Question # 32

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 # 33

Universal Containers decided to transition from Classic to Lightning Experience. They asked a developer to replace a JavaScript button that was being used to create records with prepopulated values.

What can the developer use to accomplish this?

A.

Quick Actions

B.

Validation rules

C.

Record triggered flows

D.

Apex triggers

Full Access
Question # 34

How many Accounts will be inserted by the following block of code?

A.

100

B.

0

C.

500

D.

150

Full Access
Question # 35

Which statement describes the execution order when triggers are associated to the same object and event?

A.

Triggers are executed in the order they are modified.

B.

Triggers are executed alphabetically by trigger name.

C.

Triggers are executed in the order they are created.

D.

Trigger execution order cannot be guaranteed.

Full Access
Question # 36

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 # 37

How does the Lightning Component framework help developers implement solutions faster?

A.

By providing change history and version control

B.

By providing an Agile process with default steps

C.

By providing device-awareness for mobile and desktops

D.

By providing code review standards and processes

Full Access
Question # 38

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 # 39

A business has a proprietary Order Management System (QMS) that creates orders from Its website and fulfills the orders. When the order Is created in the OMS, an integration also creates an order record In Salesforce and relates It to the contact as identified by the email on the order. As the order goes through different stages in the OMS, the integration also updates it in Salesforce.

The business notices that each update from the OMS creates a new order record in Salesforce.

Which two actions should prevent the duplicate order records from being created in Salesforce?

A.

Use the email on the contact record as an external ID.

B.

Use the order number from the OMS as an external ID.

C.

Write a trigger on the Order object to delete the duplicates.

D.

Ensure that the order number in the OMS is unique.

Full Access
Question # 40

What are three considerations when using the @InvocableMethod annotation in Apex?

Choose 3 answers

A.

Only one method using the @InvocableMethod annotation can be defined per Apex class.

B.

A method using the @InvocableMathod annotation must define a return value,

C.

A method using the @InvocableMethod annotation can have multiple input parameters.

D.

A method using the @InvocablsMethod annotation must be declared as static.

E.

A method using the @InvocableMathod annotation can be declared as Public Global.

Full Access
Question # 41

developer must provide custom user interfaces when users edit a Contact either Salesforce Classic or Lightning Experience.

What should the developer use to override the Contact's Edit button and provide this functionality?

A.

A Lightning component in Salesforce Classic and a Lightning component in Lightning Experience

B.

A Lightning page in Salesforce Classic and a Visualforce page in Lightning Experience

C.

A Visualforce page in Salesforce Classic and a Lightning component in Lightning Experience

D.

A Visualforce page in Salesforce Classic and a Lightning page In Lightning Experience

Full Access
Question # 42

A lead developer creates a virtual class called "OrderRequest". Consider the following code snippet:

How can a developer use the OrderRequest class within the CustomerOrder class?

A.

public class CusctomerOrder implements Order

B.

@Implements (class="OrderRequest”)

public class CusatomaxOrder

C.

Extends (class="OrderRequest”) pubklic

class CuastomerOrder

D.

public class CustomerOrder extends OrderRequest

Full Access
Question # 43

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 # 44

Which three Salesforce resources can be accessed from a Lightning web component?

Choose 3 answers

A.

All external libraries

B.

SVG resources

C.

Third-party web components

D.

Content asset files

E.

Static resources

Full Access
Question # 45

A developer needs to prevent the creation of Request__c records when certain conditions exist in the system. A RequestLogic class exists that checks the conditions.

What is the correct implementation?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 46

Universal Containers hires a developer to build a custom search page to help users find the Accounts they want. Users will be able to search on Name, Description,

and a custom comments field.

Which consideration should the developer be aware of when deciding between SOQL and SOSL?

Choose 2 answers

A.

SOSL is faster for text searches.

B.

SOQL is faster for text searches.

C.

SOSL is able to return more records.

D.

SOQL is able to return more records.

Full Access
Question # 47

What are three ways for a developer to execute tests in an org?

Choose 3 answers

A.

Setup Menu

B.

Tooling API

C.

Metadata API

D.

Salesforce DX

E.

Bulk APL

Full Access
Question # 48

A lead developer creates an Apex interface called Laptop.

Consider the following code snippet:

How can a developer use the Laptop Interface within the silverzaptop class?

A.

public class Silverlaptop extends Lapctop

B.

public class Silverlaprop implementa Laptop

C.

Extends (class="Laptop”) publiic claas Silverlaptcp

D.

Interface (class="Laptop") public class Silverlaptop

Full Access
Question # 49

A developer must implement a checkpaymentpbrocaessox class that provides check processing payment capabilities that adhere to what is defined for payments in the paymentProcsssor Interface.

Which implementation is correct to use the paymenterocesscr interface class?

A)

B)

C)

A.

Option A

B.

Option B

C.

Option C

Full Access
Question # 50

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 # 51

Which Lightning Web Component custom event property settings enable the event to bubble up the containment hierarchy and cross the Shadow DOM boundary?

A.

bubbles: true, composed: true

B.

bubbles: true, composed: false

C.

bubbles: false, composed: false

D.

bubbles: false, composed: true

Full Access
Question # 52

A custom Visualforce controller calls the apexPages.addMessage () method, but no messages are rendering on the page.

Which component should be added to the Visualforce page to display the message?

A.

B.

C.

D.

Full Access