ExamGecko
Home Home / Salesforce / Certified Platform Developer II

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

Question list
Search
Search

List of questions

Search

Related questions











A developer created a new trigger that inserts a Task when a new Lead is created. After deploying to production, an outside integration is periodically reporting errors.

Which change should the developer make to ensure the integration is not affected with minimal impact to business logic?

A.
Use a Try/Catch block after the insert statement.
A.
Use a Try/Catch block after the insert statement.
Answers
B.
Remove the Apex Class from the Integration User's Profile.
B.
Remove the Apex Class from the Integration User's Profile.
Answers
C.
Deactivate the Trigger before the Integration runs.
C.
Deactivate the Trigger before the Integration runs.
Answers
D.
Use the Database method with allOrNone set to False.
D.
Use the Database method with allOrNone set to False.
Answers
Suggested answer: A

An environment has two Apex Triggers: an after-update trigger on Account and an after-update trigger on Contact. The Account after-update trigger fires whenever an Account's address is updated, and it updates every associated Contact with that address. The Contact after-update trigger fires on every edit, and it updates every Campaign Member record related to the Contact with the Contact's state.

Consider the following: A mass update of 200 Account records' addresses, where each Account has 50 Contacts. Each Contact has 1 Campaign Member. This means there are 10,000 Contact records across the Accounts and 10,000

Campaign Member records across the contacts.

What will happen when the mass update occurs?

A.
The mass update will fail, since the two triggers fire in the same context, thus exceeding the number of records processed by DML statements.
A.
The mass update will fail, since the two triggers fire in the same context, thus exceeding the number of records processed by DML statements.
Answers
B.
There will be no error, since each trigger fires within its own context and each trigger does not exceed the limit of the number of records processed by DML| statements.
B.
There will be no error, since each trigger fires within its own context and each trigger does not exceed the limit of the number of records processed by DML| statements.
Answers
C.
There will be no error, since the limit on the number of records processed by DML statements is 50,000.
C.
There will be no error, since the limit on the number of records processed by DML statements is 50,000.
Answers
D.
The mass update of Account address will succeed, but the Contact address updates will fail due to exceeding number of records processed by DML statements.
D.
The mass update of Account address will succeed, but the Contact address updates will fail due to exceeding number of records processed by DML statements.
Answers
Suggested answer: B

A user receives the generic "An internal server error has occurred" while interacting with a custom Lightning Component. What should the developer do to ensure a more meaningful message?

A.
Use an AuraHandledException in a try/catch block.
A.
Use an AuraHandledException in a try/catch block.
Answers
B.
Use ProcessBuilder to catch the error.
B.
Use ProcessBuilder to catch the error.
Answers
C.
Add an onerror event handler to the tag.
C.
Add an onerror event handler to the tag.
Answers
D.
Add an error-view component to the markup.
D.
Add an error-view component to the markup.
Answers
Suggested answer: A

Global with sharing class MyRemoter { public String accountName { get; set; } public static Account account { get; set; } public AccountRemoter(} {} @RemoteAction global static Account getAccount

(String acccuntName) { account = [SELECT Id, Name, NumberOfEmployees FROM Account WHERE Name = :accountName]; return account; } } Consider the Apex class above that defines a RemoteAction used on a Visualforce search page. Which code snippet will assert that the remote action returned the correct Account?

A.
MyRemoter remote = new MyRemoter();Account a = remote.getAccount ({'TestAccount');System.assertEquals, 'TestAcccunt', a.Name -;
A.
MyRemoter remote = new MyRemoter();Account a = remote.getAccount ({'TestAccount');System.assertEquals, 'TestAcccunt', a.Name -;
Answers
B.
Account a = MyRemoter.getAccount ('TestAccount'):System.assertEquals{ 'TestAccount', a.Name };
B.
Account a = MyRemoter.getAccount ('TestAccount'):System.assertEquals{ 'TestAccount', a.Name };
Answers
C.
MyRemoter remote = new MyRemoter('TestAccount'};Account a = remote.getAccount {);System.assertEquals(, "TestAccount', a.Name -;
C.
MyRemoter remote = new MyRemoter('TestAccount'};Account a = remote.getAccount {);System.assertEquals(, "TestAccount', a.Name -;
Answers
D.
Account a = controller.getAccount('TestAccount');System.assertEquals(, 'TestAccount', a.Name } ;
D.
Account a = controller.getAccount('TestAccount');System.assertEquals(, 'TestAccount', a.Name } ;
Answers
Suggested answer: B

Messages are rendering on the page. Which component should be added to the Visualforce page to display the message?

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

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?

A.
The callouts will be made in an Apex Test class.
A.
The callouts will be made in an Apex Test class.
Answers
B.
The callouts will be made in an Apex Trigger.
B.
The callouts will be made in an Apex Trigger.
Answers
C.
The callout could take longer than 60 seconds to complete.
C.
The callout could take longer than 60 seconds to complete.
Answers
D.
over 10 callouts will be made in a single transaction.
D.
over 10 callouts will be made in a single transaction.
Answers
Suggested answer: B

A developer wants to call an Apex Server-side Controller from a Lightning Aura Component. What are two limitations to the data being returned by the Controller? Choose 2 answers

A.
A Lists of Custom Apex Classes cannot be returned by Apex Controllers called by Lightning Aura Components.
A.
A Lists of Custom Apex Classes cannot be returned by Apex Controllers called by Lightning Aura Components.
Answers
B.
Basic data types are supported, but defaults, such as maximum size for a number, are defined by the objects that they map to.
B.
Basic data types are supported, but defaults, such as maximum size for a number, are defined by the objects that they map to.
Answers
C.
A custom Apex Class can be returned, but only the values of public instance properties and methods annotated with @AuraEnabled are serialized and returned.
C.
A custom Apex Class can be returned, but only the values of public instance properties and methods annotated with @AuraEnabled are serialized and returned.
Answers
D.
Only Basic data types and sObjects are supported as return types for Apex Controllers called by Lightning Aura Components.
D.
Only Basic data types and sObjects are supported as return types for Apex Controllers called by Lightning Aura Components.
Answers
Suggested answer: B, C

Which interface needs to be implemented by a Lightning Component so that it may be displayed in modal dialog by clicking a button on a Lightning Record page?

A.
Force: lightningQuickAction
A.
Force: lightningQuickAction
Answers
B.
Lightning:editAction
B.
Lightning:editAction
Answers
C.
Fightning:quickAction
C.
Fightning:quickAction
Answers
D.
Force:lightningEditAction
D.
Force:lightningEditAction
Answers
Suggested answer: A

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?

A.
A Visualforce page that can make a real-time Apex callout to display and save the pricing back in Salesforce
A.
A Visualforce page that can make a real-time Apex callout to display and save the pricing back in Salesforce
Answers
B.
An Apex trigger that upon saving the Order will make a real-time Apex callout, saving 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
Answers
C.
A Process Builder process and Outbound Message to fetch the pricing upon save and store the pricing in Salesforce
C.
A Process Builder process and Outbound Message to fetch the pricing upon save and store the pricing in Salesforce
Answers
D.
An ETL tool to process batches of newly saved Orders every few minutes to store the pricing back in Salesforce
D.
An ETL tool to process batches of newly saved Orders every few minutes to store the pricing back in Salesforce
Answers
Suggested answer: B

What are three benefits of using declarative customizations over code? Choose 3 answers

A.
Declarative customizations generally require less maintenance.
A.
Declarative customizations generally require less maintenance.
Answers
B.
Declarative customizations do not require user testing.
B.
Declarative customizations do not require user testing.
Answers
C.
Declarative customizations cannot generate run time errors.
C.
Declarative customizations cannot generate run time errors.
Answers
D.
Declarative customizations will automatically update with each Salesforce release.
D.
Declarative customizations will automatically update with each Salesforce release.
Answers
E.
Declarative customizations are not subject to governor limits.
E.
Declarative customizations are not subject to governor limits.
Answers
Suggested answer: B, D, E
Total 408 questions
Go to page: of 41