ExamGecko
Home Home / Salesforce / Certified Platform Developer II

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

Question list
Search
Search

List of questions

Search

Related questions











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

A.
Scheduling a batch process to complete in the future
A.
Scheduling a batch process to complete in the future
Answers
B.
Processing high volumes of records
B.
Processing high volumes of records
Answers
C.
Updating a record after the completion of an insert
C.
Updating a record after the completion of an insert
Answers
D.
Calling a web service from an Apex trigger
D.
Calling a web service from an Apex trigger
Answers
Suggested answer: D

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?

A.
Change the initialization to acct.Number_Of_Times_Viewed__c = 1.
A.
Change the initialization to acct.Number_Of_Times_Viewed__c = 1.
Answers
B.
Change the assertion to System.assertEquals(0, acctAfter.Number_Of_Times_Viewed__c).
B.
Change the assertion to System.assertEquals(0, acctAfter.Number_Of_Times_Viewed__c).
Answers
C.
Add Test.startTest() before and Test.stopTest() after AuditUtil.incrementViewed.
C.
Add Test.startTest() before and Test.stopTest() after AuditUtil.incrementViewed.
Answers
D.
Add Test.startTest() before and Test.stopTest() after insert acct
D.
Add Test.startTest() before and Test.stopTest() after insert acct
Answers
Suggested answer: A

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?

A.
Perform a REST GET on the Account and a REST POST to update the Order__c with the Account's record ID.
A.
Perform a REST GET on the Account and a REST POST to update the Order__c with the Account's record ID.
Answers
B.
Perform a REST PATCH to upsert the Order__c and specify the Account's Customer_Number__c in it.
B.
Perform a REST PATCH to upsert the Order__c and specify the Account's Customer_Number__c in it.
Answers
C.
Perform a REST GET on the Account and a REST PATCH to upsert the Order__c with the Accounts record ID.
C.
Perform a REST GET on the Account and a REST PATCH to upsert the Order__c with the Accounts record ID.
Answers
D.
Perform a REST POST to update the Order__c and specify the Account's Customer_Number__c in it.
D.
Perform a REST POST to update the Order__c and specify the Account's Customer_Number__c in it.
Answers
Suggested answer: B

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

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

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?

A.
Apex SOAP Callout
A.
Apex SOAP Callout
Answers
B.
Apex REST Callout
B.
Apex REST Callout
Answers
C.
Apex SOAP Web Service
C.
Apex SOAP Web Service
Answers
D.
Apex REST Web Service
D.
Apex REST Web Service
Answers
Suggested answer: D

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?

A.
Build a Flow on Opportunity.
A.
Build a Flow on Opportunity.
Answers
B.
Create a Workflow on Opportunity.
B.
Create a Workflow on Opportunity.
Answers
C.
Use an Apex Trigger on Opportunity.
C.
Use an Apex Trigger on Opportunity.
Answers
D.
Build a Process on Opportunity
D.
Build a Process on Opportunity
Answers
Suggested answer: C

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?

A.
Use Salesforce Connect and external data objects to seamlessly import the invoice data into Salesforce without custom code.
A.
Use Salesforce Connect and external data objects to seamlessly import the invoice data into Salesforce without custom code.
Answers
B.
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.
B.
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.
Answers
C.
Create a cross-reference table in the custom invoicing system with the Salesforce Account ID of each Customer and insert invoice data nightly.
C.
Create a cross-reference table in the custom invoicing system with the Salesforce Account ID of each Customer and insert invoice data nightly.
Answers
D.
Query the Account Object upon each call to insert invoice data to fetch the Salesforce ID corresponding to the Customer Number on the invoice
D.
Query the Account Object upon each call to insert invoice data to fetch the Salesforce ID corresponding to the Customer Number on the invoice
Answers
Suggested answer: B

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?

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

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?

A.
Create a Process, call an Apex @InvocableMethod from it, and make the callout from that Apex method.
A.
Create a Process, call an Apex @InvocableMethod from it, and make the callout from that Apex method.
Answers
B.
Create an after insert trigger, call an @future(callout=true) method from it, and make the callout from that Apex method.
B.
Create an after insert trigger, call an @future(callout=true) method from it, and make the callout from that Apex method.
Answers
C.
Create a Process, call an Apex @future(callout=true) method from it, and make the callout from that Apex method.
C.
Create a Process, call an Apex @future(callout=true) method from it, and make the callout from that Apex method.
Answers
D.
Create an after insert trigger, call an Apex @InvocableMethod method from it, and make the callout from that Apex method
D.
Create an after insert trigger, call an Apex @InvocableMethod method from it, and make the callout from that Apex method
Answers
Suggested answer: B

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?

A.
Database.insert(records, false)
A.
Database.insert(records, false)
Answers
B.
Database.insert(records, true)
B.
Database.insert(records, true)
Answers
C.
insert records
C.
insert records
Answers
D.
insert (records, false)
D.
insert (records, false)
Answers
Suggested answer: A
Total 408 questions
Go to page: of 41