ExamGecko
Ask Question

Salesforce Certified Platform Developer II Practice Test - Questions Answers, Page 4

List of questions

Question 31

Report
Export
Collapse

Which use case can only be performed by using asynchronous Apex?

Scheduling a batch process to complete in the future
Scheduling a batch process to complete in the future
Processing high volumes of records
Processing high volumes of records
Updating a record after the completion of an insert
Updating a record after the completion of an insert
Calling a web service from an Apex trigger
Calling a web service from an Apex trigger
Suggested answer: D
asked 23/09/2024
Ajay Vijayan
34 questions

Question 32

Report
Export
Collapse

The test method above calls an @future method that increments the Number_of_Times_Viewed__c value. The assertion is failing because the Number_of_Times_Viewed__c equals 0. What is the optimal way to fix this?

Change the initialization to acct.Number_Of_Times_Viewed__c = 1.
Change the initialization to acct.Number_Of_Times_Viewed__c = 1.
Change the assertion to System.assertEquals(0, acctAfter.Number_Of_Times_Viewed__c).
Change the assertion to System.assertEquals(0, acctAfter.Number_Of_Times_Viewed__c).
Add Test.startTest() before and Test.stopTest() after AuditUtil.incrementViewed.
Add Test.startTest() before and Test.stopTest() after AuditUtil.incrementViewed.
Add Test.startTest() before and Test.stopTest() after insert acct
Add Test.startTest() before and Test.stopTest() after insert acct
Suggested answer: A
asked 23/09/2024
Raed Alshehri
50 questions

Question 33

Report
Export
Collapse

A company represents their customers as Accounts that have an External ID field called Customer_Number__c. They have a custom Order (Order__c) object, with a Lookup to Account, to represent Orders that are placed in their external order management system (OMS). When an order is fulfilled in the OMS, a REST call to Salesforce should be made that creates an Order record in Salesforce and retates it to the proper Account. What is the optimal way to implement this?

Perform a REST GET on the Account and a REST POST to update the Order__c with the Account's record ID.
Perform a REST GET on the Account and a REST POST to update the Order__c with the Account's record ID.
Perform a REST PATCH to upsert the Order__c and specify the Account's Customer_Number__c in it.
Perform a REST PATCH to upsert the Order__c and specify the Account's Customer_Number__c in it.
Perform a REST GET on the Account and a REST PATCH to upsert the Order__c with the Accounts record ID.
Perform a REST GET on the Account and a REST PATCH to upsert the Order__c with the Accounts record ID.
Perform a REST POST to update the Order__c and specify the Account's Customer_Number__c in it.
Perform a REST POST to update the Order__c and specify the Account's Customer_Number__c in it.
Suggested answer: B
asked 23/09/2024
William Kerr
38 questions

Question 34

Report
Export
Collapse

What are three benefits of using static resources in Visualforce and Lightning Components? Choose 3 answers

Static resource files can be packaged into a collection of related files in a zip or jar archive.
Static resource files can be packaged into a collection of related files in a zip or jar archive.
Static resource files do not count against an organization's quota of data storage.
Static resource files do not count against an organization's quota of data storage.
Static resource files are automatically minified.
Static resource files are automatically minified.
Relative paths can be used in files in static resource archives to refer to other content within the archive.
Relative paths can be used in files in static resource archives to refer to other content within the archive.
Static resource files can be referenced by using the $Resource global variable instead of hardcoded IDs.
Static resource files can be referenced by using the $Resource global variable instead of hardcoded IDs.
Suggested answer: A, D, E
asked 23/09/2024
juan otero
28 questions

Question 35

Report
Export
Collapse

A company has a native iOS app for placing orders that needs to connect to Salesforce to retrieve consolidated information from many different objects in a JSON format. Which is the optimal method to implement this in Salesforce?

Apex SOAP Callout
Apex SOAP Callout
Apex REST Callout
Apex REST Callout
Apex SOAP Web Service
Apex SOAP Web Service
Apex REST Web Service
Apex REST Web Service
Suggested answer: D
asked 23/09/2024
bryan calderon
33 questions

Question 36

Report
Export
Collapse

A company has a custom object, Sales Demo Request, that has a lookup to an Opportunity. It is required that a Sales Demo Request record be created when an Opportunity's Probability is greater than 50%. What is the optimal way to automate this?

Build a Flow on Opportunity.
Build a Flow on Opportunity.
Create a Workflow on Opportunity.
Create a Workflow on Opportunity.
Use an Apex Trigger on Opportunity.
Use an Apex Trigger on Opportunity.
Build a Process on Opportunity
Build a Process on Opportunity
Suggested answer: C
asked 23/09/2024
Brian Wilson
37 questions

Question 37

Report
Export
Collapse

A company represents their customers as Accounts in Salesforce. All customers have a unique Customer_Number__c that is unique across all of the company's systems. They also have a custom Invoice__c object, with a Lookup to Account, to represent invoices that are sent out from their external system. This company wants to integrate invoice data back into Salesforce so Sales Reps can see when a customer is paying their bills on time. What is the optimal way to implement this?

Use Salesforce Connect and external data objects to seamlessly import the invoice data into Salesforce without custom code.
Use Salesforce Connect and external data objects to seamlessly import the invoice data into Salesforce without custom code.
Ensure Customer_Number__c is an External ID and that a custom field Invoice_Number__c is an External ID and Upsert invoice data nightly.
Ensure Customer_Number__c is an External ID and that a custom field Invoice_Number__c is an External ID and Upsert invoice data nightly.
Create a cross-reference table in the custom invoicing system with the Salesforce Account ID of each Customer and insert invoice data nightly.
Create a cross-reference table in the custom invoicing system with the Salesforce Account ID of each Customer and insert invoice data nightly.
Query the Account Object upon each call to insert invoice data to fetch the Salesforce ID corresponding to the Customer Number on the invoice
Query the Account Object upon each call to insert invoice data to fetch the Salesforce ID corresponding to the Customer Number on the invoice
Suggested answer: B
asked 23/09/2024
Padraig Walsh
34 questions

Question 38

Report
Export
Collapse

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 method for a developer to troubleshoot this?

Run the Apex Test Classes for the Apex trigger to ensure the code still has sufficient code coverage.
Run the Apex Test Classes for the Apex trigger to ensure the code still has sufficient code coverage.
Turn off all Workflow Rules, then turn them on one at time to see which one causes the error.
Turn off all Workflow Rules, then turn them on one at time to see which one causes the error.
add system.debug() statements to the code and use the Developer Console logs to trace the code.
add system.debug() statements to the code and use the Developer Console logs to trace the code.
Set up debug logging for every Sales Rep, then monitor the logs for errors and exceptions.
Set up debug logging for every Sales Rep, then monitor the logs for errors and exceptions.
Suggested answer: C
asked 23/09/2024
Baheilu Tekelu
38 questions

Question 39

Report
Export
Collapse

A company wants to incorporate a third-party web service to set the Address fields when an Account is inserted, if they have not already been set. What is the optimal way to achieve this?

Create a Process, call an Apex @InvocableMethod from it, and make the callout from that Apex method.
Create a Process, call an Apex @InvocableMethod from it, and make the callout from that Apex method.
Create an after insert trigger, call an @future(callout=true) method from it, and make the callout from that Apex method.
Create an after insert trigger, call an @future(callout=true) method from it, and make the callout from that Apex method.
Create a Process, call an Apex @future(callout=true) method from it, and make the callout from that Apex method.
Create a Process, call an Apex @future(callout=true) method from it, and make the callout from that Apex method.
Create an after insert trigger, call an Apex @InvocableMethod method from it, and make the callout from that Apex method
Create an after insert trigger, call an Apex @InvocableMethod method from it, and make the callout from that Apex method
Suggested answer: B
asked 23/09/2024
B schatens
45 questions

Question 40

Report
Export
Collapse

Which statement should be used to allow some of the records in a list of records to be inserted if others fail to be inserted?

Database.insert(records, false)
Database.insert(records, false)
Database.insert(records, true)
Database.insert(records, true)
insert records
insert records
insert (records, false)
insert (records, false)
Suggested answer: A
asked 23/09/2024
Jérémy FRAISSENET
33 questions
Total 438 questions
Go to page: of 44
Search

Related questions