New Year Sale Limited Time Flat 70% Discount offer - Ends in 0d 00h 00m 00s - Coupon code: 70spcl

Salesforce PDII Salesforce Certified Platform Developer II ( Plat-Dev-301 ) Exam Practice Test

Page: 1 / 16
Total 161 questions

Salesforce Certified Platform Developer II ( Plat-Dev-301 ) Questions and Answers

Question 1

An Apex trigger creates an Order__c record every time an Opportunity is won by a Sales Rep. Recently the trigger is creating two orders. What is the optimal technique for a developer to troubleshoot this?

Options:

A.

Disable all flows, and then re-enable them one at a time to see which one causes the error.

B.

Set up debug logging for every Sales Rep, then monitor the logs for errors and exceptions.

C.

Run the Apex Test Classes for the Apex trigger to ensure the code still has sufficient code coverage.

D.

Add system.debug() statements to the code and use the Developer Console logs to trace the code.

Question 2

The CalloutUtil.makeRestCallout fails with a 'You have uncommitted work pending. Please commit or rollback before calling out' error. What should be done to address the problem?

Java

public void updateAndMakeCallout(Map regs, Map regLines) {

Savepoint sp = Database.setSavepoint();

try {

insert regs.values();

insert regLines.values();

HttpResponse response = CalloutUtil.makeRestCallout(regs.keySet(), regLines.keySet());

} catch (Exception e) {

Database.rollback(sp);

}

}

Options:

A.

Move the CalloutUtil.makeRestCallout method call below the catch block.

B.

Change the CalloutUtil.makeRestCallout to an @future method.

C.

Remove the Database.setSavepoint and Database.rollback.

D.

Change the CalloutUtil.makeRestCallout to an @InvocableMethod method.

Question 3

A developer is inserting, updating, and deleting multiple lists of records in a single transaction and wants to ensure that any error prevents all execution. How should the developer implement error exception handling in their code to handle this?1234567

Options:

A.

Use Database methods to obtain lists of Database.SaveResults.

B.

Use Database.setSavepoint() and Database.rollBack() with a try-catch statement.

C.

Use a try-catch statement and handle DML cleanu22p in the catch statement.

D.

Us29e a try-catch and use sObject.addError() on any failures.

Question 4

A developer needs a Lightning web component to display in one column on phones and two columns on tablets/desktops. Which should the developer add to the code?

Options:

A.

Add size="12" medium-device-size="6" to the elements

B.

Add size="6" small-device-size="12" to the elements

C.

Add small-device-size="12" to the elements

D.

Add medium-device-size="6" to the elements

Question 5

A company has an Apex process that makes multiple extensive database operations and web service callouts. The database processes and web services can take a long time to run and must be run sequentially. How should the developer write this Apex code without running into governor limits and system limitations?123

Options:

A.

Use Apex Scheduler to schedul4e each process.56

B.

Use Limits class to stop entire pr7ocess once governor limits are reached.8

C.

Use multip9le @future methods for each process and callout.

D.

Use Queueable Apex to chain the jobs to run sequentially.

Question 6

Universal Containers uses a custom Lightning page to provide a mechanism to perform a step-by-step wizard search for Accounts. One of the steps in the wizard is to allow the user to input text into a text field, ERP_Number__c, that is then used in a query to find matching Accounts.

Java

erpNumber = erpNumber + '%';

List accounts = [SELECT Id, Name FROM Account WHERE ERP_Number__c LIKE :erpNumber];

A developer receives the exception 'SOQL query not selective enough'. Which step should be taken to resolve the issue?

Options:

A.

Move the SOQL query to within an asynchronous process.

B.

Mark the ERP_Number__c field as required.

C.

Mark the ERP_Number__c field as an external ID.

D.

Change the query to use a SOSL statement instead of SOQL.

Question 7

A developer created an Apex class that updates an Account based on input from a Lightning web component. The update to the Account should only be made if it has not already been registered.

Java

account = [SELECT Id, Is_Registered__c FROM Account WHERE Id = :accountId];

if (!account.Is_Registered__c) {

account.Is_Registered__c = true;

// ...set other account fields...

update account;

}

What should the developer do to ensure that users do not overwrite each other’s updates to the same Account if they make updates at the same time?

Options:

A.

Add a try/catch block around the update.

B.

Use upsert instead of update.

C.

Use FOR UPDATE in the SOQL query.

D.

Include LastModifiedDate in the query to make sure it wasn’t recently updated.

Question 8

Java

@isTest

static void testUpdateSuccess() {

Account acet = new Account(Name = 'test');

insert acet;

// Add code here

extension.inputValue = 'test';

PageReference pageRef = extension.update();

System.assertNotEquals(null, pageRef);

}

What should be added to the setup, in the location indicated, for the unit test above to create the controller extension for the test?

Options:

A.

AccountControllerExt extension = new AccountControllerExt(acet);

B.

ApexPages.StandardController sc = new ApexPages.StandardController(acet); AccountControllerExt extension = new AccountControllerExt(sc);

C.

ApexPages.StandardController sc = new ApexPages.StandardController(acet.Id); AccountControllerExt extension = new AccountControllerExt(sc);

D.

AccountControllerExt extension = new AccountControllerExt(acet.Id);

Question 9

A company accepts orders for customers in their ERP system that must be integrated into Salesforce as Order__c records with a lookup field to Account. The Account object has an external ID field, ERP_Customer_ID__c. What should the integration use to create new Order__c records that will automatically be related to the correct Account?1234

Options:

A.

Upsert on the Order__c object and specify the ERP_Customer_ID__c for the Account relationship.5678

B.

Upsert on the Account and specify the ERP_Customer_ID__c for the relations9hip.101112

C.

Merge on the Order__c object and spe13cify the ERP_Customer_ID__c for 14the 15Account relationship.

D.

Insert on the Order__c object followed by an update on the Order__c object.

Question 10

Which technique can run custom logic when a Lightning web component is loaded?

Options:

A.

Use an init event to call a function.

B.

Use the connectedCallback() method.

C.

Use the renderedCallback() method.

D.

Call $A.enqueueAction and pass in the method to call.

Question 11

There is an Apex controller and a Visualforce page in an org that displays records with a custom filter consisting of a combination of picklist values selected by the user. The page takes too long to display results for some of the input combinations, while for other input choices it throws the exception, "Maximum view state size limit exceeded". What step should the developer take to resolve this issue?

Options:

A.

Adjust any code that filters by picklist values since they are not indexed.

B.

Remove instances of the transient keyword from the Apex controller to avoid the view state error.

C.

Split the layout to filter records in one Visualforce page and display the list of records in a second page using the same Apex controller.

D.

Use a StandardSetController or SOQL LIMIT in the Apex controller to limit the number of records displayed at a time.

Question 12

A developer implemented a custom data table in a Lightning web component with filter functionality. However, users are submitting support tickets about long load times when the filters are changed. The component uses an Apex method that is called to query for records based on the selected filters. What should the developer do to improve performance of the component?

Options:

A.

Use SOSL to query the records on filter change.1

B.

Use setStorable() in the Apex method to store the response in the client-side cache.2

C.

Return all records into a list when the component is created and filter the array in JavaScript.3

D.

Use a4 selective SOQL query with a custom index.

Question 13

An org has a requirement that an Account must always have one and only one Contact listed as Primary. So selecting one Contact will de-select any others. The client wants a checkbox on the Contact called 'Is Primary' to control this feature. The client also wants to ensure that the last name of every Contact is stored entirely in uppercase characters. What is the optimal way to implement these requirements?12345

Options:

A.

Write a Validation Rule on the Contact for the Is Primary logic and a before upd6ate trigger on Contact for the last name lo7gic.8910

B.

Write an after update trigger on Conta11ct for the Is Primary logic and a separate befo12re update trigger on Contact for th13e last name logic.

C.

Write an after update trigger on Account for the Is Primary logic and a before update trigger on Contact for the last name logic.

D.

Write a single trigger on Contact for both after update and before update and callout to helper classes to handle each set of logic.14

Question 14

As part of point-to-point integration, a developer must call an external web service which, due to high demand, takes a long time to provide a response. As part of the request, the developer must collect key inputs from the end user before making the callout. Which two elements should the developer use to implement these business requirements?4647

Options:

A.

Batch Apex4849

B.

Lightning web component5051

C.

Screen Flow5253

D.

Apex method that returns a Continuation object5455

Question 15

A developer is tasked with creating a Lightning web component that is responsive on various devices. Which two components should help accomplish this goal?

Options:

A.

Lightning-input-location

B.

Lightning-layout

C.

Lightning-navigation

D.

Lightning-layout-item

Question 16

Consider the Apex class below that defines a RemoteAction used on a Visualforce search page.

Java

global with sharing class MyRemoter {

public String accountName { get; set; }

public static Account account { get; set; }

public MyRemoter() {}

@RemoteAction

global static Account getAccount(String accountName) {

account = [SELECT Id, Name, NumberOfEmployees FROM Account WHERE Name = :accountName];

return account;

}

}

Which code snippet will assert that the remote action returned the correct Account?

Options:

A.

Java

MyRemoter remote = new MyRemoter();

Account a = remote.getAccount('TestAccount');

System.assertEquals( 'TestAccount', a.Name );

B.

Java

MyRemoter remote = new MyRemoter('TestAccount');

Account a = remote.getAccount();

System.assertEquals( 'TestAccount' , a.Name );

C.

Java

Account a = controller.getAccount('TestAccount');

System.assertEquals( 'TestAccount', a.Name );

D.

Java

Account a = MyRemoter.getAccount('TestAccount');

System.assertEquals( 'TestAccount', a.Name );

Question 17

A developer is tasked with ensuring that email addresses entered into the system for Contacts and for a custom object called Survey_Response__c do not belong to a list of blocked domains. The list of blocked domains is stored in a custom object for ease of maintenance by users. The Survey_Response__c object is populated via a custom Visualforce page. What is the optimal way to implement this?

Options:

A.

Implement the logic in validation rules on the Contact and the Survey_Response__c objects.

B.

Implement the logic in a helper class that is called by an Apex trigger on Contact and from the custom Visualforce page controller.

C.

Implement the logic in an Apex trigger on Contact and also implement the logic within the custom Visualforce page controller.

Question 18

An Aura component has a section that displays some information about an Account and it works well on the desktop, but we have to scroll horizontally to see the description field output on their mobile devices and tablets.

HTML

{!v.rec.Name}

{!v.rec.Description__c}

How should a developer change the component to be responsive for mobile and tablet devices?

Options:

A.

HTML

{!v.rec.Name}

{!v.rec.Description__c}

B.

1

HTML

{!v.rec.Name}

{!v.rec.Description__c}

C.

HTML

{!v.rec.Name}

{!v.rec.Description__c}

D.

HTML

{!v.rec.Name}

{!v.rec.Description__c}

Question 19

public class searchFeature {

public static List> searchRecords(string searchquery) {

return [FIND :searchquery IN ALL FIELDS RETURNING Account, Opportunity, Lead];

}

}

// Test Class

@isTest

private class searchFeature_Test {

@TestSetup

private static void makeData() {

//insert opportunities, accounts and lead

}

private static searchRecords_Test() {

List> records = searchFeature.searchRecords('Test');

System.assertNotEquals(records.size(),0);

}

}

However, when the test runs, no data is returned and the assertion fails. Which edit should the developer make to ensure the test class runs successfully?

Options:

A.

Enclose the method call within Test.startTest() and Test.stopTest().

B.

Implement the seeAllData=true attribute in the @IsTest annotation.

C.

Implement the without sharing keyword in the searchFeature Apex class.

D.

Implement the setFixedSearchResults method in the test class.

Question 20

Universal Containers uses Salesforce to track orders in an Order__c object. The Order__c object has private organization-wide defaults. The Order__c object has a custom field, Quality_Controller__c, that is a Lookup to User and is used to indicate that the specified User is performing quality control on the Order__c. What should be used to automatically give read only access to the User set in the Quality_Controller__c field?

Options:

A.

User managed sharing

B.

Record ownership

C.

Apex managed sharing

D.

Criteria-based sharing

Question 21

Universal Containers analyzes a Lightning web component and its Apex controller. Based on the code snippets, what change should be made to display the contacts' mailing addresses in the Lightning web component?

Apex controller class:

Java

public with sharing class AccountContactsController {

@AuraEnabled

public static List getAccountContacts(String accountId) {

return [SELECT Id, Name, Email, Phone FROM Contact WHERE AccountId = :accountId];

}

}

Options:

A.

Add a new method in the Apex controller class to retrieve the mailing addresses separately.

B.

Modify the SOQL query in the getAccountContacts method to include the MailingAddress field.

C.

Extend the lightning-datatable component to include a column for the MailingAddress field.

D.

Modify the SOQL query in the getAccountContacts method to include the MailingAddress field and update the columns attribute in the javascript file to add Mailing address fields.

Question 22

Universal Containers develops a Visualforce page that requires the inclusion of external JavaScript and CSS files. They want to ensure efficient loading and caching of the page. Which feature should be utilized to achieve this goal?

Options:

A.

Static resources

B.

@RemoteAction

C.

D.

Question 23

Consider the following code snippet:

Java

01 public with sharing class AccountsController{

03 @AuraEnabled

04 public List getAllAccounts(){

05 return [Select Id, Name, Industry FROM Account];

06 }

08 }

As part of the deployment cycle, a developer creates the following test class:

Java

@isTest

private class AccountsController_Test{

@TestSetup

private static void makeData(){

User user1 = [Select Id FROM User WHERE Profile.Name = 'System Administrator' ... LIMIT 1];

User user2 = [Select Id FROM User WHERE Profile.Name = 'Standard User' ... LIMIT 1];

TestUtils.insertAccounts(10,user1.Id);

TestUtils.insertAccounts(20,user2.Id);

}

@isTest

private static void testGetAllAccounts(){

// Query the Standard User into memory

List result = AccountsController.getAllAccounts();

System.assertEquals(20,result.size());

}

}

When the test class runs, the assertion fails. Which change should the developer implement in the Apex test method to ensure the test method executes successfully?

Options:

A.

Add @IsTest(seeAllData=true) to line 12 and enclose lines 15 and 16 within Test.startTest() and Test.stopTest().

B.

Add System.runAs(User) to line 14 and enclose line 15 within Test.startTest() and Test.stopTest().

C.

Query the Standard User into memory and enclose lines 15 and 16 within the System.runAs(user) method.

D.

Query the Administrator user into memory and enclose lines 15 and 16 within the System.runAs(user) method.

Question 24

A developer wrote an Apex class to make several callouts to an external system. If the URLs used in these callouts will change often, which feature should the developer use to minimize changes needed to the Apex class?

Options:

A.

Named Credentials

B.

Connected Apps

C.

Remote Site Settings

D.

Session Id

Question 25

A Salesforce org has more than 50,000 contacts. A new business process requires a calculation that aggregates data from all of these contact records. This calculation needs to run once a day after business hours. Which two steps should a developer take to accomplish this?

Options:

A.

Use the @future annotation.

B.

Implement the Database.Batchable interface.

C.

Implement the Schedulable interface.

D.

Implement the Queueable interface.

Question 26

Which method should be used to convert a Date to a String in the current user’s locale?

Options:

A.

Date.parse

B.

String.format

C.

String.valueOf

D.

Date.format

Question 27

A developer created a Lightning web component that uses a lightning-record-edit-form to collect information about Leads. Users complain that they only see one error message at a time about their input when trying to save a Lead record. Which best practice should the developer use to perform the validations on more than one field, thus allowing more than one error message to be displayed simultaneously?

Options:

A.

Apex REST

B.

Client-side validation

C.

Next Best Action

D.

Custom validation rules

Question 28

When developing a Lightning web component, which setting displays lightning-layout items in one column on small devices, such as mobile phones, and in two columns on tablet-size and desktop-size screens?

Options:

A.

Set size="12" tablet-device-size="6"

B.

Set size="6" small-device-size="12"

C.

Set size="12" medium-device-size="6"

D.

Set size="12" mobile-device-size="12"

Question 29

Universal Containers decided to use Salesforce to manage a new hire interview process. A custom object called Candidate was created with organization-wide defaults set to Private. A lookup on the Candidate object sets an employee as an Interviewer. What should be used to automatically give Read access to the record when the lookup field is set to the Interviewer user?12345

Options:

A.

The record can be shared using an Apex class.678910

B.

The record can be shared using a permission set.1112131415

C.

The record can be shared using a sharing rule.1617181920

D.

The record cannot be shared with the current setup.2122232425

Question 30

Which code snippet processes records in the most memory efficient manner, avoiding governor limits such as "Apex heap size too large"?

Options:

A.

Java

Map opportunities = new Map([SELECT Id, Amount from Opportunity]);

for(Id oppId: opportunities.keySet()){

// perform operation here

}

B.

Java

for(Opportunity opp: [SELECT Id, Amount from Opportunity]){

// perform operation here

}

C.

Java

List opportunities = Database.query('SELECT Id, Amount from Opportunity');

for(Opportunity opp: opportunities){

// perform operation here

}

D.

Java

List opportunities = [SELECT Id, Amount from Opportunity];

for(Opportunity opp: opportunities){

// perform operation here

}

Question 31

A developer needs to add code to a Lightning web component's configuration file so the component only renders for a desktop size form factor when on a record page. What should the developer add to the component's record page target configuration to meet this requirement?

Options:

A.

B.

C.

...

D.

...

Question 32

A software company uses a custom object, Defect__c, to track defects in their software. Defect__c has organization-wide defaults set to private. Each Defect__c has a related list of Reviewer__c records, each with a lookup field to User that is used to indicate that the User will review the Defect__c. What should be used to give the User on the Reviewer__c record read only access to the Defect__c record on the Reviewer__c record?34

Options:

A.

View All on Defect__c

B.

Criteria-based sharing56

C.

Lightning web component78

D.

Apex managed sharing910

Question 33

A developer is asked to find a way to store secret data with an ability to specify which profiles and users can access which secrets. What should be used to store this data?

Options:

A.

Static resources

B.

Custom metadata

C.

Custom settings

D.

System.Cookie class

Question 34

Refer to the test method below:

Java

@isTest

static void testAccountUpdate() {

Account acct = new Account(Name = 'Test');

acct.Integration_Updated__c = false;

insert acct;

CalloutUtil.sendAccountUpdate(acct.Id);

Account acctAfter = [SELECT Id, Integration_Updated__c FROM Account WHERE Id = :acct.Id][0];

System.assert(true, acctAfter.Integration_Updated__c);

}

The test method calls a web service that updates an external system with Account information and sets the Account's Integration_Updated__c checkbox to True when it completes. The test fails to execute and exits with an error: "Methods defined as TestMethod do not support Web service callouts." What is the optimal way to fix this?

Options:

A.

Add if (!Test.isRunningTest()) around CalloutUtil.sendAccountUpdate.

B.

Add Test.startTest() before and Test.stopTest() after CalloutUtil.sendAccountUpdate.

C.

Add Test.startTest() before and Test.setMock and Test.stopTest() after CalloutUtil.sendAccountUpdate.

D.

Add Test.startTest() and Test.setMock before and Test.stopTest() after CalloutUtil.sendAccountUpdate.

Question 35

A company has a Lightning page with many Lightning Components, some that cache reference data. It is reported that the page does not always show the most current reference data. What can a developer use to analyze and diagnose the problem in the Lightning page?

Options:

A.

Salesforce Lightning Inspector Storage tab12

B.

Salesforce Lightning Inspector Event Log tab34

C.

Salesforce Lightning Inspector Actions tab56

D.

Salesforce Lightning Inspector Transactions tab78

Question 36

A developer is writing code that requires making callouts to an external web service. Which scenario necessitates that the callout be made in an asynchronous method?

Options:

A.

The callout could take longer than 60 seconds to complete.

B.

The callouts will be made using the REST API.

C.

The callouts will be made in an Apex trigger.

D.

Over 10 callouts will be made in a single transaction.

Question 37

Refer to the component code and requirements below:

HTML

{!v.account.Name}

{!v.account.AccountNumber}

{!v.account.Industry}

Requirements:

    For mobile devices, the information should display in three rows.

    For desktops and tablets, the information should display in a single row.

Requirement 2 is not displaying as desired. Which option has the correct component code to meet the requirements for desktops an7d tablets?

Options:

A.

HTML

{!v.account.Name}

{!v.account.AccountNumber}

{!v.account.Industry}

B.

1213

C.

1415

HTML

{!v.account.Name}

{!v.account.AccountNumber}

{!v.account.Industry}

D.

HTML

{!v.account.Name}

{!v.account.AccountNumber}

{!v.account.Industry}

Question 38

A developer is tasked with creating a Lightning web component that allows users to create a Case for a selected product, directly from a custom Lightning page. The input fields in the component are displayed in a non-linear fashion on top of an image of the product to help the user better understand the meaning of the fields. Which two components should a developer use to implement the creation of the Case from the Lightning web component?161718

Options:

A.

lightning-record-form192021

B.

lightning-record-edit-form222324

C.

lightnin25g-input-field2627

D.

lightning-input2829

Question 39

A company notices that their unit tests in a test class with many methods to create many records for prerequisite reference data are slow. What can a developer do to address the issue?

Options:

A.

Turn off triggers, flows, and validations when running tests.

B.

Move the prerequisite reference data setup to the constructor for the test class.

C.

Move the prerequisite reference data setup to a @testSetup method in the test class.

D.

Move the prerequisite reference data setup to a TestDataFactory and call that from each test method.

Question 40

Salesforce users consistently receive a "Maximum trigger depth exceeded" error when saving an Account. How can a developer fix this error?

Options:

A.

Split the trigger logic into two separate triggers.

B.

Modify the trigger to use the isMultiThread=true annotation.

C.

Convert the trigger to use the @future annotation, and chain any subsequent trigger invocations to the Account object.

D.

Use a helper class to set a Boolean to TRUE the first time a trigger is fired, and then modify the trigger to only fire when the Boolean is FALSE.

Question 41

A company recently deployed a Visualforce page with a custom controller that has a data grid of information about Opportunities in the org. Users report that they receive a "Maximum view state size limit" error message under certain conditions. According to Visualforce best practice, which three actions should the developer take to reduce the view state?

Options:

A.

Use the transient keyword in the Apex controller for variables that do not maintain state.

B.

Use the private keyword in the controller for variables.1415

C.

Use the final keyword in the controller for variables that will not change.1617

D.

Use filters and pagination to reduce the amount of data.1819

E.

Refine any SOQL queries to return only data relevant to the page.2021

Question 42

A developer is creating a Lightning web component to display a calendar. The component will be used in multiple countries. In some locales, the first day of the week is a Monday, or a Saturday, or a Sunday. What should the developer do to ensure the calendar displays accurately for users in every locale?

Options:

A.

Query the FirstDayOfWeek field from the Locale for the current user.

B.

Use a custom metadata type to store key/value pairs.

C.

Use UserInfo.getLocale() in the component.

D.

Import the @salesforce/i18n module and use the firstDayOfWeek internationalization property.

Question 43

In an organization that has multi-currency enabled, a developer is tasked with building a Lighting component that displays the top ten Opportunities most recently accessed by the logged in user. The developer must ensure the Amount and LastModifiedDate field values are displayed according to the user’s locale. What is the most effective approach to ensure values displayed respect the user’s locale settings?1819

Options:

A.

Use the FORMAT ( ) function in the SOQL query.2021

B.

Use a wrapper class to format the values retrieved via SOQL.2223

C.

Use REGEX expressions to format the values retrieved via SOQL.2425

D.

Use the FOR VIEW clause in the SOQL query.2627

Question 44

Consider the queries in the options below and the following information:

    For these queries, assume that there are more than 200,000 Account records.

    These records include soft-deleted records in the Recycle Bin.

    There are two fields marked as External Id: Customer_Number__c and ERP_Key__c.

Which two queries are optimized for large data volumes?

Options:

A.

SELECT Id FROM Account WHERE Name != '' AND Customer_Number__c = 'ValueA'

B.

SELECT Id FROM Account WHERE Name != '' AND IsDeleted = false

C.

SELECT Id FROM Account WHERE Name != NULL

D.

SELECT Id FROM Account WHERE Id IN :aListVariable

Question 45

Refer to the code snippet below:

Java

public static void updateCreditMemo(String customerId, Decimal newAmount){

List toUpdate = new List();

for(Credit_Memo__c creditMemo : [Select Id, Name, Amount__c FROM Credit_Memo__c WHERE Customer_Id__c = :customerId LIMIT 50]) {

creditMemo.Amount__c = newAmount;

toUpdate.add(creditMemo);

}

Database.update(toUpdate,false);

}

A custom object called Credit_Memo__c exists in a Salesforce environment. As part of a new feature development, the developer needs to ensure race conditions are prevented when a set of records are mod1ified within an Apex transaction. In the preceding Apex code, how can the developer alter the que2ry statement to use SOQL features to prevent race conditions within a tr3ansaction?4

Options:

A.

[Select Id, Name, Amount__c FROM Credit_Memo__c WHERE Customer_Id__c = :customerId LIMIT 50 FOR UPDATE]

B.

[Select Id, Name, Amount__c FROM Credit_Memo__c WHERE Customer_Id__c = :customerId USING SCOPE LIMIT 50]

C.

[Select Id, Name, Amount__c FROM Credit_Memo__c WHERE Customer_Id__c = :customerId LIMIT 50 FOR REFERENCE]

D.

[Select Id, Name, Amount__c FROM Credit_Memo__c WHERE Customer_Id__c = :customerId LIMIT 50 FOR VIEW]

Question 46

A company's support process dictates that any time a case is closed with a status of 'Could not fix,' an Engineering Review custom object record should be created and populated with information from the case, the contact, and any of the products associated with the case. What is the correct way to automate this using an Apex trigger?12

Options:

A.

A before update trigger on Case that creates the Engineering Review record and inserts it3456

B.

An after upset trigger on Case that creates the Engineering Review record and ins7erts it8910

C.

11 A before upset trigger on Case that creates the Engineering Review record and inserts it1213

D.

An after update trigger14 on Ca15se that creates the Engineering Review record and inserts it

Question 47

The Account after-update trigger fires whenever an Account's address is updated, and it updates every associated Contact with that address. The Contact after-update trigger fires on every edit, and it updates every Campaign Member record related to the Contact with the Contact's state. Consider the following: A mass update of 200 Account records' addresses, where each Account has 50 Contacts. Each Contact has one Campaign Member. This means there are 10,000 Contact records across th23e Accounts and 10,000 Campaign Member records across the contacts. What will happen when the mass update occurs?24252627

Options:

A.

The mass update of Account address 28will succeed, but the Contact address updates wil29l fail due to exceeding number of records processed by DML statements.3031

B.

There will be no32 error, since each trigger fires 33within its own context and each trigger does not exceed the limit of the number of records processed by DML statements.34

C.

The mass update will fail, since the two triggers fire in the same35 context, thus exceeding the number of records.36

Question 48

Refer to the markup below:

HTML

A Lightning web component displays the Account name and two custom fields out of 275 that exist on the object. The custom fields are correctly declared and populated. However, the developer receives complain2223ts that the component performs slowly. What can the developer d2425o to improve the performance?

Options:

A.

Replace layout-type="Full" with fields={fields}.

B.

Add density="compact" to the component.

C.

Replace layout-type="Full" with layout-type="Partial".

D.

Add cache="true" to the component.

Page: 1 / 16
Total 161 questions