Weekend Sale - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sntaclus

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?

Choose 3 answers

A.

Use the private keyword in the controller for variables,

B.

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

C.

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

D.

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

E.

Use filters and pagination to reduce the amount of data.

A company has many different unit test methods that create Account records as

part of their data setup. A new required field was added to the Account and now all

of the unit tests fail.

What is the optimal way for a developer to fix the issue?

A.

Add the required field to the data setup for all of the unit tests.

B.

Add a before insert trigger on Account to set the value of the required field,

C.

Change the required field to be a validation rule that excludes the System Administrator profile.

D.

Create a TestDataFactory class that serves as the single place to create Accounts for unit tests and set the required field there.

Universal Containers implements a private sharing model for the Convention Attendee co custom object. As part of a new quality assurance effort, the company created an Event_Reviewer_c user lookup field on the object.

Management wants the event reviewer to automatically gain ReadWrite access to

every record they are assigned to.

What is the best approach to ensure the assigned reviewer obtains Read/Write access to the record?

A.

Create a before insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.

B.

Create an after insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.

C.

Create criteria-based sharing rules on the Convention Attendee custom object to share the records with the Event Reviewers,

D.

Create a criteria-based sharing rule on the Convention Attendee custom object to share the records with a group of Event Reviewers.

A developer gets an error saying ‘Maximum Trigger Depth Exceeded.’

What is a possible reason to get this error message?

A.

A trigger is recursively invoked more than 16 times.

B.

The SOQL governor limits are being hit.

C.

There are numerous DML operations in the trigger logic.

D.

A flow trigger was included too many times.

A developer has a test class that creates test data before making a mock callout but now receives a 'You have uncommitted work pending. Please commit or rollback before calling out’ error.

Which step should be taken to resolve the error?

A.

Ensure both the Insertion and mock callout occur after the I==L. stoptest_().

B.

Ensure the records are Inserted before the Tezt.startTest() statement and the mock callout occurs within a method annotated with @testSetup.

C.

Ensure both the insertion and mock callout occur after the Test.startTest().

D.

Ensure the records are inserted before the Test.startTess() statement and the mock callout occurs after the Test. Startest().

Universal Containers (UC) has enabled the translation workbench and has translated picklist values. UC has a custom multi-select picklist field, Product__c, on the Account object that allows sales reps to specify which of UC’s products an Account already has. A developer is tasked with writing an Apex method that retrieves Account records, including the Product_c field.

What should the developer do to ensure the value of Products__c is in the current user's language?

A.

Use tolabel ducts__c) in the fields list of the SOQL query.

B.

Set the locale on each record in the SOQL result list.

C.

Call the translate method on each record in the SOQL result list.

D.

Use the Locale clause in the SOQL query.

A developer is asked to develop a new AppFxchange application. A feature of the program creates Survey records when a Case reaches a certain stage and is of a certain Record Type. This feature needs to be configurable, as different Salesforce instances require Surveys at different times. Additionally, the out-of-the-box AppExchange app needs to come with a set of best practice settings that apply to

most customers.

What should the developer use to store and package the custom configuration settings for the app?

A.

Custom objects

B.

Custom settings

C.

Custom metadata

D.

Custom labels

Consider the Apex controller below, that is called from an Aura component.

What is wrong with this code?

A.

Line 1: class must be global

8. Lines 1 and 6: class and method must be global

B.

Line 6: method must be static

C.

Line 8: method must first serialize the list to JSON before returning

An org has an existing process, built using Process Builder, on Opportunity that sets a custom field, CommissionBaseAmount__c, when

an Opportunity is edited and the Opportunity's Amount changes.

A developer recently deployed an Opportunity before update trigger that uses the CommissionBaseAmount__c and complex logic to calculate a

value for a custom field, CommissionAmount__c, when an Opportunity stage changes to Closed/Won.

Users report that when they change the Opportunity to Closed/Won and also change the Amount during the same save, the CommissionAmount__c is incorrect.

Which action should the developer take to correct this problem?

A.

A Replace the process with a Fast Field Update record-trigger flow.

B.

Call the trigger from the process.

C.

Call the process from the trigger.

Refer to the test method below''

The test method calls a web service that updates an external system with Account

information and sets the Accounts 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.”

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D