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

Exact2Pass Menu

Question # 4

If Apex code executes inside the execute() 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 asynchronaus 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 # 5

A developer is implementing an Apex class for a financial system. Within the class, the variables 'creditAmount' and 'debitAmount' should not be able to change once a value is assigned.

In which two ways can the developer declare the variables to ensure their value can only be assigned one time?

Choose 2 answers

A.

Use the static keyword and assign its value in a static initializer.

B.

Use the final keyword and assign its value in the class constructor.

C.

Use the final keyword and assign its value when declaring the variable.

D.

Use the static keyword and assign its value in the class constructor.

Full Access
Question # 6

A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an

OrderlItem 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 OrderItem records to a new Order record?

A.

Add without sharing to the Apex class declaration.

B.

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

C.

Create a junction object between OrderItem and Order.

D.

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

Full Access
Question # 7

Universal Containers (UC) processes orders in Salesforce in a custom object, Order__c. They also allow sales reps to upload CSV files with thousands of orders at a time.

A developer is tasked with integrating orders placed in Salesforce with UC's enterprise resource planning (ERP) system.

After the status for an Order__c is first set to 'Placed', the order information must be sent to a REST endpoint in the ERP system that can

process one order at a time.

What should the developer implement to accomplish this?

A.

Callout from a Queueable class called from a trigger

B.

Callout from a Batchable class called from a scheduled job

C.

Flow with a callout from an invocable method

D.

Callout from an @future method called from a trigger

Full Access
Question # 8

What are two benefits of using External IDs?

Choose 2 answers

A.

An External ID field can be used to reference an ID from another external system.

B.

An External ID can be a formula field ta help create a unique key from two fields in Salesforce.

C.

An External ID can be used with Salesforce Mobile to make external data visible.

D.

An External 1D is indexed and can improve the performance of SOOL queries.

Full Access
Question # 9

In terms of the MVC paradigm, what are two advantages of implementing the view layer of a Salesforce application using Lightning Web Component-based development over Visualforce?

Choose 2 answers

A.

Rich component ecosystem

B.

Leg capturing via the Debug Logs Setup page

C.

Built-in standard and custom set controllers

D.

Self-contained and reusable units of an application

Full Access
Question # 10

Which code statement includes an Apex method named updateAccounts in the class AccountController for use in a Lightning web component?

A.

import updateAccounts from "AccountControlles';

B.

import updateAccounts from "Salesforce/apex/AccountController:';

C.

import updateAccounts from "Account@ontroller.updateAccounts';

D.

import updateAccounts from "@salesforce/apex/AccountController.updateAccounts";

Full Access
Question # 11

A developer is creating a Lightning web component to show a list of sales records.

The Sales Representative user should be able to see the commission field on each record. The Sales Assistant user should be able to see all fields on the record except the commission field.

How should this be enforced so that the component works for both users without showing any errors?

A.

Use WITH SECURITY_ENFORCED In the SOQL that fetches the data for the component,

B.

Use Security.stripInaccessible Le to remove fields inaccessible to the current user.

C.

Use Lightning Locker Service to enforce sharing rules and field-level security.

D.

Use Lightning Data Service to get the collection of sales records.

Full Access
Question # 12

What should be used to create scratch orgs?

A.

Salesforce CLI

B.

Sandbox refresh

C.

Developer Console

D.

Workbench

Full Access
Question # 13

A developer created a trigger on the Account object. While testing the trigger, the developer sees the error message ‘Maximum trigger depth exceeded’.

What could be the possible causes?

A.

The developer does not have the correct user permission.

B.

The trigger is too long and should be refactored into a helper class.

C.

The trigger does not have sufficient code coverage.

D.

The trigger is getting executed multiple times.

Full Access
Question # 14

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 the @isTest (seeAllData=true) annotation in the test class.

B.

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

C.

Create a static resource containing test data.

D.

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

Full Access
Question # 15

A developer is alerted to an issue with a custom Apex trigger that is causing records to be duplicated.

What is the most appropriate debugging approach to troubleshoot the issue?

A.

Review the Historical Event logs to identify the source of the issue.

B.

Add system.debug statements to the code to track the execution flow and identify the issue.

C.

Use the Apex Interactive Debugger to step through the code and identify the issue.

D.

Disable the trigger in production and test to see if the issue still occurs.

Full Access
Question # 16

Provide question feedback here (optional):

Based on this code, what is the value of x?

A.

4

B.

1

C.

2

D.

3

Full Access
Question # 17

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 a master-detail field on the Global Address object to the Account object.

B.

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

C.

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

D.

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

Full Access
Question # 18

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

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

A.

VS Code

B.

Execute Anonymous

C.

Salesforce CLI

D.

Developer Console

Full Access
Question # 20

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

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 does not use system. runAs to execute as a specific user.

B.

The test method is calling an @future method.

C.

The test method relies on existing data in the sandbox.

D.

The test method has a syntax error in the code.

Full Access
Question # 22

A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of Apex tests allowing

them to test isolated requirements for various types of Salesforce cases.

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

A.

Create a mock using the HttpcalloutMock interface.

B.

Use @TestSetup with a void method.

C.

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

D.

Create test data before Test .startTest() in the unit test.

Full Access
Question # 23

A company decides to implement a new process where every time an Opportunity is created, a follow up Task should be created and assigned to the Opportunity Owner.

What is the most efficient way for a developer to implement this?

A.

Apex trigger on Task

B.

Task actions

C.

Auto-launched flow on Task

D.

Record-triggered flow on Opportunity

Full Access
Question # 24

What are two use cases for executing Anonymous Apex code?

Choose 2 answers

A.

schedule an Apex class to run periodically

B.

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

C.

To run a batch Apex class to update all Contacts

D.

To add unit test code coverage to an org

Full Access
Question # 25

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.

Trigger execution order cannot be guaranteed.

C.

Triggers are executed alphabetically by trigger name.

D.

Triggers are executed in the order they are created.

Full Access
Question # 26

The following code snippet is executed by a Lightning web component in an environment with more than 2,000 lead records:

Which governor limit will likely be exceeded within the Apex transaction?

A.

Total number of SOOL quires issued

B.

Total number of DML statements issued

C.

Total number of records processed as a result of DML statements

Full Access
Question # 27

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 LATEST formula on each of the latest availability date fields.

B.

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

C.

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

D.

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

Full Access
Question # 28

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 cade 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 # 29

A developer must provide custom user interfaces when users edit a Contact in 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 page in Lightning Experience

D.

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

Full Access
Question # 30

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

Choose 3 answers

A.

Only one method using the @invecableMethod annotation can be defined per Apex class_

B.

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

C.

A method using the @invocablemethod annotation must be declaredas static,

D.

GO A method using the @invocablemethod annotation must define a return value.

E.

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

Full Access
Question # 31

A developer has an integer variable called maxAttempts. The developer needs to ensure that once maxAttempts is initialized, it preserves its value for the length of the Apex transaction; while being able to share the variable's state between trigger executions.

How should the developer declare maxAttempts to meet these requirements?

A.

Declare maxattempts as a constant using the static and final keywords.

B.

Declare maxattempts as a member variable on the trigger definition.

C.

Declare maxattempts as a variable on a helper class.

D.

Declare maxAttempts as a private static variable on a helper class.

Full Access
Question # 32

Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package application. One of the application modules allows the user to calculate body fat using the Apex class, Bodyfat, and its method, calculateBodyFat (). The product owner wants to ensure this method is accessible by the consumer of the application when developing customizations outside the ISV's package namespace.

Which approach should a developer take to ensure calculateBodyFat () is accessible outside the package namespace?

A.

Declare the class and method using the global access modifier.

B.

Declare the class and method using the public access modifier.

C.

Declare the class as public and use the global access modifier on the method.

D.

Declare the class as global and use the public access modifier on the method.

Full Access
Question # 33

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

Public class CustomerOrder {

//code implementation

}

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

A.

Extends (class="OrderRequest"}public class CustomerOrder

B.

public class CustomerOrder implements Order

C.

public class CustomerOrder extends OrderRequest

D.

@Implements (class="OrderRequest")public class Customerorder

Full Access
Question # 34

Which annotation should a developer use on an Apex method to make it available to be wired to a property in a Lightning web component?

A.

@AuraEnabled(cacneable=true)

B.

@RemoteAction (cacheable-true)

C.

@RemoteAction

D.

@AuraEnabled

Full Access
Question # 35

When a user edits the Postal Code on an Account, a custom Account text field named "Timezone" must be updated based on the values in a PostalCodeToTimezone__c custom object.

Which two automation tools can be used to implement this feature? Choose 2 answers

A.

Quick actions

B.

Approval process

C.

Account trigger

D.

Fast Field Updates record-triggered flow

Full Access
Question # 36

Developers at Universal Containers (UC) use version control to share their code changes, but they notice that when they deploy their code to different environments they often have failures. They decide to set up Continuous Integration (CI).

What should the UC development team use to automatically run tests as part of their CI process?

A.

Salesforce CLI

B.

Visual Studio Code

C.

Force.com Toolkit

D.

Developer Console

Full Access
Question # 37

(Full question statement)

Universal Containers wants Opportunities to no longer be editable when they reach the Closed/Wonstage.

Which two strategies can a developer use to accomplish this?

Choose 2 answers.

A.

Use an automatically launched Approval Process.

B.

Use a Validation Rule.

C.

Use a before-save Apex Trigger.

D.

Use an Auto-Response Rule.

Full Access
Question # 38

A developer created a trigger on a custom object. This custom object also has some dependent pick lists.

According to the order of execution rules, which step happens first?

A.

The original record is loaded from the database.

B.

System validation is run for maximum field lengths.

C.

Old values are overwritten with the new record values.

D.

JavaScript validation is run in the browser,

Full Access
Question # 39

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

Choose 2 answers

A.

Control

B.

default

C.

Buddle

D.

Emit

Full Access
Question # 40

What are two benefits of using declarative customizations over code?

Choose 2 answer

A.

Declarative customizations automatically update with each Salesforce release.

B.

Declarative customizations automatically generate test classes.

C.

Declarative customizations cannot generate run time errors

D.

Declarative customizations generally require less maintenance

Full Access
Question # 41

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.

Before record-triggered flaw

B.

Apex trigger

C.

After record-triggered flow

D.

Validation rule

Full Access
Question # 42

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.

Junction object between Applicant and Job

B.

Lookup field from Applicant to Job

C.

Master-detail field from Applicant to Job

D.

Formula field on Applicant that references Job

Full Access
Question # 43

A developer completed modifications feature that is comprised of two elements:

* Apex trigger

* Trigger handler Apex class

What are two factors that the developer must take into account to properly deploy them to the production environment?

Choose 2 answers

A.

Apex classes must have at least 75% code coverage org-wide.

B.

All methods in the test classes must use @istest.

C.

At least one line of code must be executed for the Apex trigger.

D.

Test methods must be declared with the testMethod keyword.

Full Access
Question # 44

Universal Containers is developing a new Lightning web component for their marketing department. They want to ensure that the component is fine-tuned and provides a seamless user experience.

What are some benefits of using the Lightning Component framework?

A.

Better performance due to client-side rendering

B.

Automatic support for accessibility standards

C.

Compatibility with all web browsers

D.

Easy integration with third-party libraries

Full Access
Question # 45

A developer is integrating with a legacy on-premise SQL database.

What should the developer use to ensure the data being integrated is matched to the right records in Salesforce?

A.

External Object

B.

External ID field

C.

Formula field

D.

Lookup field

Full Access
Question # 46

A developer must write an Apex method that will be called from a Lightning component. The method may delete an Account stored in the accountRec variable.

Which method should a developer use to ensure only users that should be able to delete Accounts can successfully perform deletions?

A.

accountRec, isDeletable()

B.

Schema,sObjectType,Account, isDeletable ()

C.

accuntRec, sObjectType,isDeletable()

D.

Account,isDeleteable

Full Access
Question # 47

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 invoke a public method in the child component.

B.

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

C.

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

D.

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

Full Access
Question # 48

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

Choose 2 answers

A.

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

B.

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

C.

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

D.

The @testSetup annotation is not supported when the @isTest(SeeAllData=True) annotation is used .

Full Access
Question # 49

The sales management team at Universal Containers requires that the Lead Source field of the Lead record be populated when a Lead is converted What should be done to ensure that a user populates the Lead Source field prior to converting a Lead?

A.

Create an after trigger on Lead.

B.

Use Lead Conversion field mapping.

C.

Use a formula field.

D.

Use a validation rule.

Full Access
Question # 50

How can a developer check the test coverage of autolaunched Flows before deploying them in a change set?

A.

Use the ApextestResult class.

B.

Use the Flow Properties page.

C.

Use SOQL and the Tooling API.

D.

Use the Code Coverage Setup page,

Full Access
Question # 51

A Primaryld_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 .. 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.

Upload the CSV into-a custom object related to candidate__c.

B.

Create a before insert trigger to correctly map the records,

C.

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

D.

Create a before save flow to correctly map the records.

Full Access
Question # 52

As part of new feature development, a developer is asked to build a responsive application capable of responding to touch events, that will be executed on stateful clients.

Which two technologies are built on a framework that fully supports the business requirement? Choose 2 answers

A.

Lightning Web Components

B.

Visualforce Components

C.

Visualforce Pages

D.

Aura Components

Full Access
Question # 53

What can be used to override the Account's standard Edit button for Lightning Experience?

A.

Lightning action

B.

Lightning page

C.

Lightning component

D.

Lightning flow

Full Access
Question # 54

(Full question statement)

A developer must create a CreditCardPayment class that provides an implementation of an existing Payment class.

public virtual class Payment {

public virtual void makePayment(Decimal amount) {

// implementation

}

}

Which is the correct implementation?

A.

public class CreditCardPayment extends Payment { public virtual void makePayment(Decimal amount) { /* implementation */ } }

B.

public class CreditCardPayment implements Payment { public virtual void makePayment(Decimal amount) { /* implementation */ } }

C.

public class CreditCardPayment implements Payment { public override void makePayment(Decimal amount) { /* implementation */ } }

D.

public class CreditCardPayment extends Payment { public override void makePayment(Decimal amount) { /* implementation */ } }

Full Access
Question # 55

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.

Flow

B.

Lightning Web Components

C.

Visualforce

D.

VUE JavaScript framework

Full Access
Question # 56

Given the following Apex statement:

Account myAccount = [SELECT Id, Name FROM Account);

What occurs when more than one Account is returned by the SOQL query?

A.

The variable, myaccount, is automatically cast to the List data type.

B.

An unhandled exception is thrown and the code terminates.

C.

The query fails and an error is written to the debug log.

D.

The first Account returned is assigned to myAccount.

Full Access
Question # 57

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

Choose 2 answers

A.

Tooling API

B.

Metadata API

C.

Bulk API

D.

Developer Console

Full Access
Question # 58

A developer has identified a method in an Apex class that performs resource intensive actions in memory by iterating over the result set of a SOQL statement on the account. The method also performs a DML statement to save the changes to the database.

Which two techniques should the developer implement as a best practice to ensure transaction control and avoid exceeding governor limits'*

Choose 2 answers

A.

Use the @ReadOnly annotation to bypass the number of rows returned by a SOQL.

B.

Use partial DML statements to ensure only valid data is committed.

C.

Use the System.limit class to monitor the current CPU governor limit consumption.

D.

Use the Database.Savepoint method to enforce database integrity.

Full Access
Question # 59

A developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunityLineltem trigger.

Which method allows access to the price book?

A.

Use Test .getStandardPricebookid() to get the standard price book ID.

B.

Use @isTest [SeeAllData=true| and delete the existing standard price book.

C.

Use @Testvisible to allow the test method to see the standard price book.

D.

Use Test. loadData () and a static resource to load a standard price book.

Full Access
Question # 60

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.

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

B.

Query the Profile where the ID equals userinfo.getprofileID () and then use the profile opportunity. getdefaultresoratype (} method,

C.

Use the schema. Userinfo. Opportunity. getDefaultRecordType {) method.

D.

Use opportunity. sobjectTyps. getDeacribse().getRecordTypeInfos {) to get a list of record types, and iterate through them until isDefaultRecordtypeMapping {) is true.

Full Access
Question # 61

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

The developer creates a test class with a test method that calls MyClass.myStaticMethod 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?

A.

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

B.

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

C.

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

D.

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

Full Access