Winter Sale - Special Limited Time 55% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 44314956B5

Good News !!! PDII Salesforce Certified Platform Developer II (WI23) is now Stable and Pass

PDII Salesforce Certified Platform Developer II (WI23) Question and Answers

Salesforce Certified Platform Developer II (WI23)

Last Update 3 days ago
Total Questions : 402

PDII Exam is stable now with all latest questions are added 3 days ago. Just download our Full package and start your journey with Salesforce Certified Platform Developer II (WI23) certification. All these Salesforce Exam PDII questions are real and verified by our Experts in the related industry fields.

PDII PDF

PDII PDF (Printable)
$54
$119.99

PDII Testing Engine

PDII PDF (Printable)
$63
$139.99

PDII PDF + Testing Engine

PDII PDF (Printable)
$79.65
$176.99
Question # 1

A developer has working business logic code, but sees the following error in the test class:

You have uncommitted work pending. Please commit or rollback before calling out. What is a possible solution?

Options:

A.  

Rewrite the business logic and test classes with ©TestVisible set on the callout.

B.  

Set seeAIIData to "true" at the top of the test class, since the code does not fail in practice.

C.  

Call support for help with the target endpoint, as it is likely an external code error.

D.  

Use test.IsRunningTest() before making the callout to bypass it in test execution.

Discussion 0
Question # 2

A company has a custom object Sales_Help_Request__c that has a Lookup relationship to Opportunity. The Sales_Help_Request__c has a number field, Number_of_Hours__c, that represents the amount of time spent on the Sales_Help_Request__c.

A developer is tasked with creating a field, Total_Hours__c, on Opportunity that should be the sum of all of the Number_of_Hours__c values for the Sales_Help_Request__c records related to that Opportunity.

What should the developer use to implement this?

Options:

A.  

A workflow rule on the Sales_Help_Request__c object

B.  

A roll-up summary field on the Opportunity object

C.  

A trigger on the Opportunity object

D.  

A trigger on Sales_Help_Request__c

Discussion 0
Question # 3

A developer needs to implement a system audit feature that allows users, assigned to a custom profile named "Auditors", to perform searches against the historical records in the Account object. The developer must ensure the search is able to return history records that are between 12 and 24 months old.

Given the code below, which select statement should be inserted below as a valid way to retrieve the Account History records ranging from 12 to 24 month old?

A)

Question # 3

B)

Question # 3

C)

Question # 3

D)

Question # 3

Options:

A.  

Option A

B.  

Option B

C.  

Option C

D.  

Option D

Discussion 0
Question # 4

In a VisualForce page with a VisualForce component that has rendered set to false when the page loads, how can a developer ensure it will show on a re-render?

Options:

A.  

Set the re-render attribute of the component to true.

B.  

Perform a full page refresh since rendered elements cannot be re-rendered without refreshing.

C.  

Set the rendered attribute of the component to true and re-render the component.

D.  

Set the rendered attribute of the component to true and re-render a parent component.

Discussion 0
Question # 5

A developer is developing a reuseable Aura Component that will reside on an sObject Lightning Page with the following HTML snippet:

Options:

A.  

Set the sObject type as a component attribute.

B.  

Add force:hasSobjectName to the implements.

C.  

Use the getSObjectTypeQ method in an Apex class.

D.  

Create a design attribute and configure via App builder.

Discussion 0
Question # 6

A company decides that every time an Opportunity is created, they want to create a follow up Task and assign it to the Opportunity Owner.

What should a developer use to implement the requirements?

Options:

A.  

A Process Builder on Opportunity

B.  

A trigger on Task

C.  

A trigger on Opportunity

D.  

A Process Builder on Task

Discussion 0
Question # 7

Question # 7

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

A)

Question # 7

B)

Question # 7

C)

Question # 7

D)

Question # 7

Options:

A.  

Option A

B.  

Option B

C.  

Option C

D.  

Option D

Discussion 0
Question # 8

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?

Options:

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.  

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

D.  

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

Discussion 0
Question # 9

An org has a requirement that the Shipping Address on the Account must be validated by a third-party web service, before the Account is allowed to be inserted.

What is the optimal way to meet this requirement?

Options:

A.  

Make a callout to the web service from a custom Visualforce controller.

B.  

Make a callout to the web service from a standard Visualforce controller.

C.  

Make a callout to the web service from an after insert trigger.

D.  

Make a callout to the web service from a before insert trigger.

Discussion 0
Question # 10

Just prior to a new deployment, the Salesforce Administrator who configured a new order fulfillment process in a developer sandbox suddenly left the company. The users had fully tested all of the changes in the sandbox and signed off on them.

Unfortunately, although a Change Set was started, it was not complete. A developer is brought in to help finish the deployment.

What should the developer do to identify the configuration changes that need to be moved into production?

Options:

A.  

Leverage the Setup Audit Trail to review the changes made by the departed Administrator and identify which changes should be added to the Change Set.

B.  

Use the Metadata API and a supported development IDE to push all of the configuration from the sandbox into production to ensure no changes are lost.

C.  

Set up Continuous Integration and a Git repository to automatically merge all changes from the sandbox metadata with the production metadata.

D.  

In Salesforce setup, look at the last modified date for every object to determine which should be added to the Change Set.

Discussion 0
Question # 11

A developer needs to store variables to control the style and behavior of a Lightning Web Component. Which feature should be used to ensure that the variables are testable in both Production and all Sandboxes?

Options:

A.  

Custom Metadata

B.  

Custom Object

C.  

Custom Setting

D.  

Custom Variable

Discussion 0
Question # 12

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.  

Session Id

B.  

Connected Apps

C.  

Remote Site Settings

D.  

Named Credentials

Discussion 0
Question # 13

A company manages information about their product offerings in custom objects named Catalog and Catalog Item. Catalog Item has a master-detail field to Catalog, and each Catalog may have as many as 100,000 Catalog Items.

Both custom objects have a CurrencylsoCode Text field that contains the currency code they should use. If a Catalog's CurrencylsoCode changes, all of its Catalog Items' CurrencylsoCodes should be changed as well.

What should a developer use to update the CurrencylsoCodes on the Catalog Items when the Catalog's CurrencylsoCode changes^5

Options:

A.  

An after insert trigger on Catalog that updates the Catalog Items if the Catalog's CurrencylsoCode is different

B.  

An after insert trigger on Catalog Item that updates the Catalog Items if the Catalog's CurrencylsoCode is different

C.  

A Database.Schedulable and Database.Batchable class that queries the Catalog object and updates the Catalog Items if the Catalog CurrencylsoCode is different

D.  

A Database.Schedulable and Database.Batchable class that queries the Catalog Item object and updates the Catalog Items if the Catalog CurrencylsoCode is different

Discussion 0
Question # 14

A developer must create a way for external partners to submit millions of leads into Salesforce per day-How should the developer meet this requirement?

Options:

A.  

Publicly expose a Visualforce page via Force.com Sites

B.  

Create a web service on Heroku that uses Heroku Connect

C.  

Host a Web-to-Lead form on the company website

D.  

Publicly expose an Apex Web Service via Force.com Sites

Discussion 0
Question # 15

Universal Containers wants to use a Customer Community with Customer Community Plus licenses so their customers can track how many of containers they are renting and when they are due back. Many of their customers are global companies with complex Account hierarchies, representing various departments within the same organization. One of the requirements is that certain community users within the same Account hierarchy be able to see several departments' containers, based on a junction object that relates the Contact to the various Account records that represent the departments. Which solution solves these requirements?

Options:

A.  

A Custom Report Type and a report Lightning Component on the Community Home Page

B.  

An Apex Trigger that creates Apex Managed Sharing records based on the junction object's relationships

C.  

A Custom List View on the junction object with filters that will show the proper records based on owner

D.  

A Visualforce page that uses a Custom Controller that specifies without sharing to expose the records

Discussion 0
Question # 16

When should you use the "transient" property on variables?

Options:

A.  

Variables that you want transmitted as part of the view state. Static variables also don't get transmitted

B.  

Variables that you don't want transmitted as part of the view state. Static variables also don't get transmitted

C.  

Static variables that you want transmitted as part of the view state to save space

D.  

Large variables in order to save space

Discussion 0
Question # 17

A Lightning Component has a section that displays some information about an Account and it works well on the desktop, but users have to scroll horizontally to see the Description field output on their mobile devices and tablets.

Question # 17

Which option has the changes to make the component responsive for mobile and tablet devices?

Options:

A.  

B.  

C.  

D.  

E.  

Option A

F.  

Option B

G.  

Option C

Discussion 0
Question # 18

A developer has requirement to query three fields (id, name, Type) from an Account and first and last names for all Contacts associated with the Account.

Which option is the preferred optimized method to achieve this for the Account named ‘Ozene Electronics’?

Options:

A.  

Account a = (SELECT ID, Name, Type from Account where name= Ozone Electronics;)

list 1contacts = (SELECT firstname, lastname from Contacts where accountid=: a -ID0;

B.  

C.  

Account a = (SELECT ID, Name, Type, (select contat,firstName, Contact,LastName from Account, Contacts) from Account where name; Ozone Electronic' Limit 1 );

D.  

List 1Accounts = (Select ID, Name, Type from Account Join (Select ID, firstname, lastname form Contact where contact account , name 'ozone electronics));

E.  

List 1Contacts = new list ( );

for(Contact c ; 1Select firstname, lastname Account, Name Account,ID Account, Type from Contact where Account: Name=' electronics')) ( iContacts.add(c);)

Discussion 0
Question # 19

As part of a custom development, a developer creates a Lightning Component to show how a particular opportunity progresses over time. The component must display the date stamp when any of the following fields change:

• Amount Probability, Stage, or Close Date

What is the most efficient way to Query such information?

Options:

A.  

[Select Amount, CloseDate, StageName, Probability FROM OpportunityHistory WHERE Opportunityld = :oppId];

B.  

[Select Newvalue, Oldvalue From OpportunityField_History Where Oppportunity = oppid AND Field IN

C.  

[Select NewValue, Oldvalue FROM Opportunity FieldHistory WHERE Opportunityld = :oppId AND Field IN

D.  

('StageName', Probability',Amount /CloseDate')];

E.  

[Select Amount CloseDate. StageName, Probability FROM Opportunity_History WHERE Opportunityld - :oppId];

Discussion 0
Question # 20

A developer has created a solution using the SOAP API for authenticating Communities users. What is needed when issuing the login() Call? (Choose two.)

Options:

A.  

Organization Id

B.  

Session Id

C.  

Username and Password

D.  

Security Token

Discussion 0
Question # 21

What is the transaction limit for the number of records using QueryLocator?

Options:

A.  

50,000

B.  

50,000,000

C.  

100,000

D.  

5,000,000

E.  

There is no limit

Discussion 0
Question # 22

A company has a web page that needs to get Account record information, given its Salesforce record ID, from JavaScript on the page and then display it. Which method of integration is optimal?

Options:

A.  

SOAP API

B.  

Apex REST Web Service

C.  

Apex SOAP Web Service

D.  

REST API

Discussion 0
Question # 23

A managed package uses a list of country ISO codes and country names as references data in many different places.. managed package Apex code.

What is the optimal way to store and retrieve the list?

Options:

A.  

Store the information in Custom Metadata and query it with SOQL.

B.  

Store the information in Custom Metadata and access it with the getAll() method.

C.  

Store the information in a List Custom Setting and query it with SOQL.

D.  

Store the information in a list Custom Setting and access it with the getAll() method

Discussion 0
Question # 24

Sometimes events on Salesforce need to be handled by an external system due to the scale or type of process being executed. Consider the use case of a user in Salesforce needing to get pricing for an order they are building in Salesforce while on the phone with a customer. The pricing logic already exists in a third-party system. Instead of recreating this logic in Salesforce, it will be leveraged by making a request of the third-party system. The response, in this case the pricing, will be returned and stored back in Salesforce. What is the optimal solution?

Options:

A.  

A Visualforce page that can make a real-time Apex callout to display and save the pricing back in Salesforce

B.  

An Apex trigger that upon saving the Order will make a real-time Apex callout, saving the pricing back in Salesforce

C.  

A Process Builder process and Outbound Message to fetch the pricing upon save and store the pricing in Salesforce

D.  

An ETL tool to process batches of newly saved Orders every few minutes to store the pricing back in Salesforce

Discussion 0
Question # 25

What is the transaction limit for the number of records for SOQL queries?

Options:

A.  

5,000

B.  

20,000

C.  

50,000

D.  

10,000

E.  

There is no limit

Discussion 0
Question # 26

if the "PageReference.setRedirect" Apex function is set to False, what type of request is made?

Options:

A.  

Get request

B.  

Postback request

C.  

If PageReference points to the same controller and subset of extensions, postback request, otherwise get request

Discussion 0
Question # 27

How would you test a web service?

Options:

A.  

Use the @future annotation on the method

B.  

Call the WebService interface

C.  

Web Services do not need to be tested

D.  

Create a class that implements the WebServiceMock interface

Discussion 0
Question # 28

A developer needs to send Account records to an external system for backup purposes. The process must take a snapshot of Accounts as they are saved and then make a callout to a RESTful web service. The web service can only receive, at most, one record per call. Which feature should be used to implement these requirements?

Options:

A.  

workflow

B.  

@future

C.  

Queueable

D.  

Process Builder

Discussion 0
Question # 29

A company has a custom object. Order__c, that has a custom picklist field. Status__c, with values of New, In Progress," or Fulfilled and a lookup field, Contact_c, to Contact.

Which SOQL query wrii return a unique list of all the Contact records that have no Fulfilled Orders?

Options:

A.  

SELECT Contact_c From order_c Where id NOT IN (SELECT id FROM_c Where States_c + Fulfilled')

B.  

SELECT iD FROM Contact WHERE id NOT IN (SELECT id From order_c WHERE_c = Fulfilled')

C.  

SELECT Contact_c FROM Order_c Where Status_c <> ;Fulfilled'

D.  

SELECT id FROM Contact WHERE id NOT IN (SELECT Contact _c FROM order_c Where Status_c = fulfilled')

Discussion 0
Question # 30

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

Options:

A.  

The callouts will be made in an Apex Test class.

B.  

The callouts will be made in an Apex Trigger.

C.  

The callout could take longer than 60 seconds to complete.

D.  

over 10 callouts will be made in a single transaction.

Discussion 0
Question # 31

The Contact object has a custom field called "Zone." Its data type is "Text" and field length is 3. What is the outcome after executing the following code snippet in the org?

Question # 31

Options:

A.  

Both inserts succeed and the contact record that has the Zone value of 'PI'IT is set to NULL

B.  

A partial insert succeeds and the contact record that has the Zone value 'IAD1 is inserted

C.  

Both inserts succeed and the contact record that has the Zone value of PITT is truncated

D.  

An unhandled DML exception is thrown and no contact records are inserted

Discussion 0
Question # 32

A company exposes a REST web service and wants to establish two-way SSL between Salesforce and the REST web service. A certificate signed by an appropriate certificate authority has been provided to the developer.

What modification is necessary on the Salesforce side? (Choose two.)

Options:

A.  

Create an entry for the certificate in Certificate and Key Management

B.  

Update the code to use HttpRequest.setClientCertificateName()

C.  

Configure two-factor authentication with the provided certificate

D.  

Update the code to use HttpRequest.setHeaderQ to set an Authorization header.

Discussion 0
Question # 33

What is the transaction limit for the number of SOSL queries?

Options:

A.  

20

B.  

2,000

C.  

100 (synchronous), 200 (async)

D.  

200 (synchronous), 100 (async)

E.  

There is no limit

Discussion 0
Question # 34

A developer has created a Lightning web component that uses the getRecord wire adapter.

Which three things should the developer do in a Jest test to validate the wire method is working as expected?

Choose 3 answers

Options:

A.  

Import mrf from iwe.

B.  

Create a JSON file with mode data.

C.  

Use the API.

D.  

Use an assert statement to validate results.

E.  

Import getRecord from lightning/uiRecordAp1

Discussion 0
Question # 35

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

Question # 35

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.  

Use CastiCase.update(account, false).

B.  

Add a try/catch block around the update.

C.  

Use upsert instead of update.

D.  

Use FOR UPDATE in a SOQL query.

Discussion 0
Question # 36

The head of recruiting at Universal Containers wants to provide all internal users the ability to search for open positions by role, department, and location via a new recruiting app, In addition to search, users of the app should be able to refer a fried, apply for a position, and review the status of their current submissions. The app should be made available in Salesforce Mobile, but offline access is not required.

Given these requirements, what is the recommended approach to developer the app?

Options:

A.  

Visualforce

B.  

Lightning Web Components

C.  

Lightning Experience Builder

D.  

Salesforce SDK

Discussion 0
Question # 37

An org has a Process Builder process 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 C:rr.i;5icn

A.  

T.cur.t c is incorrect.

Which two actions should the developer take to correct this problem? Choose 2 answers

Options:

A.  

Call the trigger from the process.

B.  

Uncheck the recursion checkbox on the process.

C.  

Use a static Boolean variable in the trigger.

D.  

Call the process from the trigger.

Discussion 0
Question # 38

A developer wants to integrate invoice and invoice line data into Salesforce from a custom billing system. The developer decides to make realtime callouts from the billing system using the SOAP API. Unfortunately, the developer is getting a lot of errors when inserting the invoice line data because the invoice header record doesn't exist yet.

What will help ensure ne transactional Integrity of the integration?

Options:

A.  

Create the invoice header and the related invoice lines in the same create() call leveraging External Ids.

B.  

Develop a custom Apex web service to handle a custom JSON data structure with both invoice header and related invoice lines.

C.  

Use an ETL tool and the Bulk API running nightly, thus ensuring all of the data is handled at the same time.

D.  

Set the AIIOrNoneHeader to true when calling each of create() for invoice headers and create() for invoice lines.

Discussion 0
Question # 39

A developer is writing a Visualforce page that queries accounts in the system and presents a data table with the results. The users want to be able to filter the results based on up to five fields. However, the users want to pick the five fields to use as filter fields when they run the page.

Which Apex code feature is required to facilitate this solution'

Options:

A.  

Streaming API

B.  

Dynamic SOQL

C.  

Report API

D.  

Dynamic variable binding

Discussion 0
Question # 40

A company uses a custom-built enterprise resource planning (ERP) system to handle order management. The company wants Sales Reps to know the status of orders so that if a customer calls to ask about their shipment, the Sales Rep can advise the customer about the order's status and tracking number if it is already shipped.

Which two methods can make this ERP order data visible in Salesforce? Choose 2 answers

Options:

A.  

Ensure real-time order data is in Salesforce using the Streaming API.

B.  

Write a cron job In Salesforce to poll the ERP system for order updates.

C.  

Have the ERP system push the data into Salesforce using the SOAP API.

D.  

Use Salesforce Connect to view real-time Order data in the ERP system.

Discussion 0
Question # 41

A developer is creating a Lightning web component that contains a child component. The property stage is being passed from the parent to the child. The public property is changing, but the setOppList function is not being invoked.

Question # 41

What should the developer change to allow this?

Options:

A.  

Move the logic from connectedCalIback() to constructor().

B.  

Create a custom event from the parent component to set the property.

C.  

Move the logic from connectedCallback() nto renderedCallback().

D.  

Move the logic to a getter/setter pair.

Discussion 0
Question # 42

Consider the code above.

Question # 42

When a user dicks on the Link of a Contact's name, what happens'

Options:

A.  

The outputPanel refreshes, showing the Contacts details.

B.  

A new page opens, showing the Contact's details.

C.  

The page refreshes, showing the Contact's details.

D.  

Nothing happens: the commandLink is missing an action attribute.

Discussion 0
Question # 43

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

Options:

A.  

@RemoteAction

B.  

@RestRtsoorct

C.  

@AuraEnaWed

D.  

@HttpInvocabte

Discussion 0
Question # 44

What are three reasons that a developer should write Jest tests for Lightning web components?

Choose 3 answers

Options:

A.  

To test basic user interaction

B.  

To verify that events fire when expected

C.  

To test how multiple components work together

D.  

To verify the DOM output of a component

E.  

To test a component's non-public properties

Discussion 0
Question # 45

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

Options:

A.  

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

B.  

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

C.  

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

D.  

Use the private keyword in the controller for variables

E.  

Use filters and pagination to reduce the amount of data.

Discussion 0
Question # 46

A developer created a class that implement he Queueable interface, as follows:

As part of the deployment process, the developer is asked to create a corresponding test class.

Which two actions should the developer take to successfully execute the test class?

Choose 2 answers

Options:

A.  

Ensure the running user of the test class has, at least, the View All permission on the Order object

B.  

Enclose System.enqueueJob (new orderQueueable Job ( }) within Test. starttest and Test, stoptest ()

C.  

Implement seeAllData-true to ensure the Queueable )ob is able to run in bulk mode.

D.  

Implement Test.isRunningtest ( ) to prevent chaining jobs during test execution.

Discussion 0
Question # 47

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

Options:

A.  

Import updateAccounts from AccountController’;

B.  

Import updateAccounts from @salesforceapexAccountControllerupdateAccounts’;

C.  

Import updateAccounts from @salesforceapex AccountController’;

D.  

Import updateAccounts from AccountControllerupdateAccount’;

Discussion 0
Question # 48

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?

Choose 2 answers

Options:

A.  

lightning-record-edit-form

B.  

lightning-input

C.  

lightning-record-form

D.  

lightning-input-field

Discussion 0
Question # 49

A developer writes a lightning web component that displays a dropdown list of all custom objects in the org from which a user will select Apex method prepares and returns data to the component.

What should the developer do to determine which objects to include m the response?

Options:

A.  

Check the isCustom ( ) value on the sObject describe result.

B.  

Use the getCustomObject ( ) method from the Schema class.

C.  

Import the list of all custom objects from @salesforce/schema.

D.  

Check the getObjectType () value for Custom' or 'Standard' on the sObject describe result.

Discussion 0
Question # 50

Customer billing data must be added and updated into Salesforce from a remote system on a weekly basis. Additionally, customer activity information must be extracted from Salesforce and put it into an on-premises data warehouse on a weekly basis.

Which approach should be used to import data into Salesforce and export data out of Salesforce, taking into consideration that these imports and exports can interfere with end-user operations during business hours and involve large amounts of data?

Options:

A.  

Call-in directly from each remote system to Salesforce APIs to push and pull the data

B.  

Salesforce Connect to push data to and pull data from the remote systems

C.  

Batch Apex, where Salesforce pushes data to and pulls data from the remote systems

D.  

Replication via third-party ETL to push data into Salesforce and pull data out in batches

Discussion 0
Question # 51

Consider the following code snippet:

Question # 51

The Apex method is executed in an environment with a large data volume count for Accounts, and the query Is performing poorly.

Which technique should the developer Implement to ensure the query performs optimally, while preserving the entire result set?

Options:

A.  

Annotate the method with the @Future annotation.

B.  

Create a formula field to combine the CreatedDate and RecardType value, then filter based on the formula.

C.  

Use the Database.queryLocator method to retrieve the accounts.

D.  

Break down the query into two individual queries and Join the two result sets.

Discussion 0
Question # 52

A developer created an Apex class that makes outbound RESTful callout. The following was created to send a fake response in Apex test methods.

Question # 52

Which method can be called to return this fake response in the test methods?

Options:

A.  

TestsetMock

B.  

TestcreateStub

C.  

testSetup

D.  

Test.setTestData

Discussion 0
Question # 53

The Salesforce instance at Universal Containers currently integrates with a third-party company to validate mailing addresses via REST services. The third-party address verification system recently changed endpoint URLs for all their set vices from https://th-addreaa-service.3pc.com to https://plc1-mailsarvice.3pc.com. Everything else remained the same. The developer updated code to reflect this endpoint change, but the mailing address validation service stopped working after the change.

What else should be done to complete this web service end point change?

Options:

A.  

Test the callout property using HttpCalloutMock.

B.  

Add web service IP Addresses to Trusted IP Ranges m the Network Access security controls settings.

C.  

Use a Custom Setting with the new endpoint Instead of hard coding the URL.

D.  

Create a new Remote Site for the new endpoint URL.

Discussion 0
Question # 54

When calling a RESTful web service, a developer receives a JSON payload that has a data hierarchy that is nested three levels deep. How can the developer describe the external data?

Options:

A.  

Deserialize the data untyped and then process it.

B.  

Declare a class with three levels and deserialize the JSON typed with this class.

C.  

Use the ANT migration tool, the custom metadata API, or the Dataloader.

D.  

Use middleware to flatten the JSON and consume it as a new custom object.

Discussion 0