ExamGecko
Ask Question

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

List of questions

Question 91

Report
Export
Collapse

Which statement is true about using ConnectApi namespace (also called Chatter in Apex)? (Choose two.)

Chatter in Apex methods honor the 'with sharing' and 'without sharing' keywords
Chatter in Apex methods honor the 'with sharing' and 'without sharing' keywords
Chatter in Apex operations are synchronous, and they occur immediately
Chatter in Apex operations are synchronous, and they occur immediately
Chatter in Apex methods do not run in system mode; they run in the context of the current user
Chatter in Apex methods do not run in system mode; they run in the context of the current user
Many test methods related to Chatter in Apex require the IsTest (SeeAIIData=true) annotation
Many test methods related to Chatter in Apex require the IsTest (SeeAIIData=true) annotation
Suggested answer: C, D
asked 23/09/2024
Brian Carlo Hubilla
36 questions

Question 92

Report
Export
Collapse

A developer receives a LimitException: Too many query rows: 50001 error when running code.

What debugging approach using the Developer Console provides the fastest and most accurate mechanism to identify a specific component that may be returning an unexpected number of rows?

Count the number of Row Limit warning messages in the Debug Logs
Count the number of Row Limit warning messages in the Debug Logs
Add System.debug(System.getQueryRows()) to the code to track SOQL usage
Add System.debug(System.getQueryRows()) to the code to track SOQL usage
Filter the Debug Log on SOQL_EXECUTE_END statements to track the results of each SOQL Query
Filter the Debug Log on SOQL_EXECUTE_END statements to track the results of each SOQL Query
Use the Execution Overview to see the number of rows returned by each Executed Unit
Use the Execution Overview to see the number of rows returned by each Executed Unit
Suggested answer: C
asked 23/09/2024
Sweet Don
35 questions

Question 93

Report
Export
Collapse

A developer is writing a Visualforce page to display a list of all of the checkbox fields found on a custom object.

What is the recommended mechanism the developer should use to accomplish this?

Schema Class
Schema Class
Apex API
Apex API
Schema Builder
Schema Builder
Metadata API
Metadata API
Suggested answer: A
asked 23/09/2024
inigo abeledo
39 questions

Question 94

Report
Export
Collapse

A developer has created a Team Member sObject that has a Master-Detail relationship to a Project sObject and a Lookup relationship to the User sObject. The developer must ensure that a User listed on a Team Member record has Read-Write access to the parent Project record.

How can the developer accomplish this if the Project sObject has a Private sharing model and thousands of Project records?

Create a Controller that uses the Without Sharing keyword
Create a Controller that uses the Without Sharing keyword
Create a Criteria-Based Sharing Rule on the Project sObject
Create a Criteria-Based Sharing Rule on the Project sObject
Create a Team Member Trigger that inserts Project_Share records
Create a Team Member Trigger that inserts Project_Share records
Create a Project Sharing Rule that shares to the Team Member Group
Create a Project Sharing Rule that shares to the Team Member Group
Suggested answer: C
asked 23/09/2024
Ashad Conley
38 questions

Question 95

Report
Export
Collapse

1 Contact con = new Contact ( LastName =fSmith', Department = fAdminT) 2 insert con; 3 Contact insertedContact=[select Name from Contact where id=icon.Id]; 4 Savepoint sp_admin = Database.setSavepoint(); 5 con.Department = fHRf;

6 update con; 7 Database.rollback(sp_admin); 8 System.debug(Limits.getDmlStatements 0); Given the following code, what value will be output in the logs by line #8?

5
5
3
3
4
4
2
2
Suggested answer: C
asked 23/09/2024
Russell James
38 questions

Question 96

Report
Export
Collapse

What is a recommended practice with regard to the Apex CPU limit? (Choose two.)

Optimize SOQL query performance
Optimize SOQL query performance
Use Map collections to cache sObjects
Use Map collections to cache sObjects
Avoid nested Apex iterations
Avoid nested Apex iterations
Reduce view state in Visualforce pages
Reduce view state in Visualforce pages
Suggested answer: B, C
asked 23/09/2024
Rakesh Sharma
34 questions

Question 97

Report
Export
Collapse

A developer wants to create a Visualforce page that allows a user to search for a given account by Name. If the account is found, the account details should be populated on screen. If no account is found, an error message should be displayed to the user.

How can this be accomplished? (Choose two.)

Use the (apex: information) tag to display the error message
Use the (apex: information) tag to display the error message
Use the ApexPages.addMessage() method to add the error message
Use the ApexPages.addMessage() method to add the error message
Use the <apex:pageMessages> tag to display the error message
Use the <apex:pageMessages> tag to display the error message
Use the accountaddErrorQ method to add the error message
Use the accountaddErrorQ method to add the error message
Suggested answer: B, C
asked 23/09/2024
MARCIA SHEILA PELAEZ GONZALEZ
38 questions

Question 98

Report
Export
Collapse

A developer has built a multi-page wizard using a single Custom Controller to query and update dat a. Users are complaining that the pages are loading slowly.

What will improve performance? (Choose three.)

Reducing the view state
Reducing the view state
Using actionRegion and rerender
Using actionRegion and rerender
Turning off the standard stylesheet
Turning off the standard stylesheet
Setting the Apex Page attribute cache=true
Setting the Apex Page attribute cache=true
Using selective queries
Using selective queries
Suggested answer: A, D, E
asked 23/09/2024
Josiah Pardee
46 questions

Question 99

Report
Export
Collapse

A developer writes the following Apex trigger so that when a Case is closed, a single Survey record is created for that Case. The issue is that multiple Survey_c records are being created per Case.

Salesforce Certified Platform Developer II image Question 99 67746 09232024003105000000

What could be the cause of this issue?

A user is creating the record as Closed
A user is creating the record as Closed
A workflow rule is firing with a Create Task action
A workflow rule is firing with a Create Task action
A workflow rule is firing with a Field Update action
A workflow rule is firing with a Field Update action
A user is editing the record multiple times
A user is editing the record multiple times
Suggested answer: D
asked 23/09/2024
Martien de Kleijn
29 questions

Question 100

Report
Export
Collapse

What is a potential design issue with the following code?

Salesforce Certified Platform Developer II image Question 100 67747 09232024003105000000

SOQL could be avoided by creating a formula field for StageName in Account from the related Opportunity
SOQL could be avoided by creating a formula field for StageName in Account from the related Opportunity
The code will result in a System.LimitException : Too many script statements error
The code will result in a System.LimitException : Too many script statements error
The code will result in a System.DmException:Entity_is_Deleted error
The code will result in a System.DmException:Entity_is_Deleted error
The code will result in a System.LimitException: Apex CPU time limit exceeded error
The code will result in a System.LimitException: Apex CPU time limit exceeded error
Suggested answer: D
asked 23/09/2024
Carmina Medel
33 questions
Total 438 questions
Go to page: of 44
Search

Related questions