ExamGecko
Home Home / Salesforce / Certified Platform Developer II

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

Question list
Search
Search

List of questions

Search

Related questions











What can be done to improve the performance of the insert trigger shown above?

A.
A.
Answers
B.
B.
Answers
C.
C.
Answers
D.
D.
Answers
Suggested answer: D

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

A.
@RemoteAction
A.
@RemoteAction
Answers
B.
@RestRtsoorct
B.
@RestRtsoorct
Answers
C.
@AuraEnaWed
C.
@AuraEnaWed
Answers
D.
@HttpInvocabte
D.
@HttpInvocabte
Answers
Suggested answer: B

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 blacklisted domains. The list of blacklisted domains will be stored In a custom object for ease of maintenance by users. Note that the Survey_Response__c object is populated via a custom visualforce page.

What is the optimal way to implement this?

A.
Implement the logic in an Apex trigger on Contact and also implement the logic within the Custom visualforce page controller.
A.
Implement the logic in an Apex trigger on Contact and also implement the logic within the Custom visualforce page controller.
Answers
B.
Implement the logic in the Custom Visualforce page controller and call that method from an Apex trigger on Contact.
B.
Implement the logic in the Custom Visualforce page controller and call that method from an Apex trigger on Contact.
Answers
C.
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 a helper class that is called by an Apex trigger on Contact and from the Custom Visualforce page controller.
Answers
D.
Implement the logic in a Validation Rule on the Contact and a validation Rule on the Survey_Response__c object.
D.
Implement the logic in a Validation Rule on the Contact and a validation Rule on the Survey_Response__c object.
Answers
Suggested answer: C

Universal Containers allows customers to log into a Salesforce Community and update their orders via a custom Visualforce page. Universal Containers' sales representatives can edit the orders on the same Visualforce page.

What should a developer use in an Apex test class to test that record sharing is enforced on the Visualforce page?

A.
Use System.profllels() to test as an administrator and a community user,
A.
Use System.profllels() to test as an administrator and a community user,
Answers
B.
Use System.profilels() to test as a sales rep and a community user.
B.
Use System.profilels() to test as a sales rep and a community user.
Answers
C.
Use System.runAs() to test as a sales rep and a community user.
C.
Use System.runAs() to test as a sales rep and a community user.
Answers
D.
Use System.runAs() to test as an administrator and a community user.
D.
Use System.runAs() to test as an administrator and a community user.
Answers
Suggested answer: C

A company has a custom object. Request__c. that has a field, Completed__c. and a Lookup to Opportunity, Opportunity__c.

Which SOQL query will get a unique list of all of the Opportunity records that have a Completed Request?

A.
A.
Answers
B.
B.
Answers
C.
C.
Answers
D.
D.
Answers
Suggested answer: C

What is a benefit of using a WSDL with Apex?

A.
Allows for web services to be tested and achieve code coverage
A.
Allows for web services to be tested and achieve code coverage
Answers
B.
Allows for classes to be imported into Salesforce
B.
Allows for classes to be imported into Salesforce
Answers
C.
Reduces the number of callouts to third-party web services
C.
Reduces the number of callouts to third-party web services
Answers
D.
Enables the user to not pass a Session ID where it is not necessary
D.
Enables the user to not pass a Session ID where it is not necessary
Answers
Suggested answer: B

An org contains two custom objects; Building__c and Office__c. Office__c has a Lookup field to Building__c.

A developer is asked to automatically populate the Number_of_Offices__c field on the Building__c object with the count of related Office__c records anytime an Office__c record s created or deleted. The developer cannot modify the field types.

Which solution meets the requirements?

A.
Flow
A.
Flow
Answers
B.
Workflow
B.
Workflow
Answers
C.
Apex Trigger
C.
Apex Trigger
Answers
D.
Process Builder
D.
Process Builder
Answers
Suggested answer: C

A developer i$ tasked Dy Unversai Containers to build out a system to track the container repair process. Containers should be tracked as they move through the repair process, starting when a customer reports an issue and ending when the container is returned to the customer.

Which solution meets these business requirements while following best practices?

A.
Use Flow Builder|.to develop a Sites page for customers to submit repair requests and track the status of their request.
A.
Use Flow Builder|.to develop a Sites page for customers to submit repair requests and track the status of their request.
Answers
B.
involve a Salesforce administrator and build out a declarative solution that works in Salesforce desktop and mobile.
B.
involve a Salesforce administrator and build out a declarative solution that works in Salesforce desktop and mobile.
Answers
C.
Build an automated Lightning Application using Application Events to ensure data integrity.
C.
Build an automated Lightning Application using Application Events to ensure data integrity.
Answers
D.
Use Platform Events with Workflow Rules and RFID integration to ensure proper tracking of the containers.
D.
Use Platform Events with Workflow Rules and RFID integration to ensure proper tracking of the containers.
Answers
Suggested answer: A

A developer receives an error when trying to call a global server-side method using the @remoteAction decorator. How can the developer resolve the error?

A.
Add static to the server-side method signature.
A.
Add static to the server-side method signature.
Answers
B.
Decorate the server-side method with (static=true).
B.
Decorate the server-side method with (static=true).
Answers
C.
Change the function signature to be private static.
C.
Change the function signature to be private static.
Answers
D.
Decorate the server-side method with (static=false)
D.
Decorate the server-side method with (static=false)
Answers
Suggested answer: A

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?

A.
Create the invoice header and the related invoice lines in the same create() call leveraging External Ids.
A.
Create the invoice header and the related invoice lines in the same create() call leveraging External Ids.
Answers
B.
Develop a custom Apex web service to handle a custom JSON data structure with both invoice header and related invoice lines.
B.
Develop a custom Apex web service to handle a custom JSON data structure with both invoice header and related invoice lines.
Answers
C.
Use an ETL tool and the Bulk API running nightly, thus ensuring all of the data is handled at the same time.
C.
Use an ETL tool and the Bulk API running nightly, thus ensuring all of the data is handled at the same time.
Answers
D.
Set the AIIOrNoneHeader to true when calling each of create() for invoice headers and create() for invoice lines.
D.
Set the AIIOrNoneHeader to true when calling each of create() for invoice headers and create() for invoice lines.
Answers
Suggested answer: A
Total 408 questions
Go to page: of 41