ExamGecko
Ask Question

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

List of questions

Question 121

Report
Export
Collapse

Employee_c is a Child object of Company_c. The Company_c object has an external Id field Company_ld_c.

How can a developer insert an Employee_c record linked to Company_c with a Company_ld_c of '999'?

Employee_c emp = new Employee_c(Name=fDeveloperf); emp.Company_r = f999f insert emp;
Employee_c emp = new Employee_c(Name=fDeveloperf); emp.Company_r = f999f insert emp;
Employee_c emp = new Employee_c(Name=fDeveloperf); emp.Company_c = f999f insert emp;
Employee_c emp = new Employee_c(Name=fDeveloperf); emp.Company_c = f999f insert emp;
Employee_c emp = new Employee_c(Name=fDeveloperT); emp. Company_c = new Company_c(Company_Id_c=f 999 T) insert emp;
Employee_c emp = new Employee_c(Name=fDeveloperT); emp. Company_c = new Company_c(Company_Id_c=f 999 T) insert emp;
Employee_c emp = new Employee_c(Name=fDeveloperf); emp.Company_r = new Company _ r(Company Id c=f999f) insert emp;
Employee_c emp = new Employee_c(Name=fDeveloperf); emp.Company_r = new Company _ r(Company Id c=f999f) insert emp;
Suggested answer: D
asked 23/09/2024
Harieswaran Ramesh
37 questions

Question 122

Report
Export
Collapse

A developer must create a custom pagination solution. While users navigate through pages, if the data is changed from elsewhere, users should still see the cached results first accessed.

How can the developer meet these requirements?

Use @Cache annotation
Use @Cache annotation
Use a StandardSetController
Use a StandardSetController
Use OFFSET in SOQL queries
Use OFFSET in SOQL queries
Use OFFSET WITH CACHE in SOQL queries
Use OFFSET WITH CACHE in SOQL queries
Suggested answer: B
asked 23/09/2024
Charles Hagan
31 questions

Question 123

Report
Export
Collapse

Which use case is an appropriate fit for the ©future asynchronous Apex method? (Choose two.)

A developer has jobs that need larger query results than regular transactions allow
A developer has jobs that need larger query results than regular transactions allow
A developer needs to segregate DML operations and bypass the mixed save DML error
A developer needs to segregate DML operations and bypass the mixed save DML error
A developer has long-running jobs with large data volumes that need to be performed in batches
A developer has long-running jobs with large data volumes that need to be performed in batches
A developer has long-running methods and needs to prevent delaying an Apex transaction
A developer has long-running methods and needs to prevent delaying an Apex transaction
Suggested answer: B, D
asked 23/09/2024
janet phillips
36 questions

Question 124

Report
Export
Collapse

A developer has written an After Update trigger on Account. A workflow rule and field update cause the trigger to repeatedly update the Account records.

How should the developer handle the recursive trigger?

Deactivate the trigger and move the logic into a Process or Flow
Deactivate the trigger and move the logic into a Process or Flow
Deactivate the workflow rule to prevent the field update from executing
Deactivate the workflow rule to prevent the field update from executing
Use a static variable to prevent the trigger from executing more than once
Use a static variable to prevent the trigger from executing more than once
Use a global variable to prevent the trigger from executing more than once
Use a global variable to prevent the trigger from executing more than once
Suggested answer: C
asked 23/09/2024
Abid Ali Minhas
35 questions

Question 125

Report
Export
Collapse

A company wants to create a dynamic survey that navigates users through a different series of questions based on their previous responses.

What is the recommended solution to meet this requirement?

Dynamic Record Choice
Dynamic Record Choice
Lightning Process Builder
Lightning Process Builder
Visualforce and Apex
Visualforce and Apex
Custom Lightning Application
Custom Lightning Application
Suggested answer: A
asked 23/09/2024
André Batista
39 questions

Question 126

Report
Export
Collapse

Which statement is true regarding both Flow and Lightning Process? (Choose two.)

Can use Apex methods with the @lnvocableMethod annotation
Can use Apex methods with the @lnvocableMethod annotation
Are both server-side considerations in the Order of Execution
Are both server-side considerations in the Order of Execution
Can use Apex that implements the Process.Plugin interface
Can use Apex that implements the Process.Plugin interface
Are able to be embedded directly into Visualforce pages
Are able to be embedded directly into Visualforce pages
Suggested answer: A, C
asked 23/09/2024
Stefan Denić
19 questions

Question 127

Report
Export
Collapse

A developer has a page with two extensions overriding the Standard controller for Case.

Salesforce Certified Platform Developer II image Question 127 67774 09232024003105000000

What will happen when a user clicks the command button?

All of the three Save methods will be executed
All of the three Save methods will be executed
Save from Case Standard Controller will be executed
Save from Case Standard Controller will be executed
Save from CaseExtensionTwo will be executed
Save from CaseExtensionTwo will be executed
Save from CaseExtensionOne will be executed
Save from CaseExtensionOne will be executed
Suggested answer: D
asked 23/09/2024
Swen Evers
39 questions

Question 128

Report
Export
Collapse

What is a valid request for the following REST method? (Choose two.)

@HttpPost global static void myPostMethod(String si, Integer il, Boolean bl, String 52)

<request> <sl>my first string</sl> <ll>123</il> <32>my second string</32> <bl>false</bl></request>
<request> <sl>my first string</sl> <ll>123</il> <32>my second string</32> <bl>false</bl></request>
<request> <sl>"my first string"</sl> <il>123</il> <sZ>!,my second string"</32> <bl>false</bl></request>
<request> <sl>"my first string"</sl> <il>123</il> <sZ>!,my second string"</32> <bl>false</bl></request>
si" : "my first string", 11" : "123", "bl" : "false", "S2" : "my second string"
si" : "my first string", 11" : "123", "bl" : "false", "S2" : "my second string"
il" : 123, "SI" : "my first string", "S2" : "my second string", "bl" : false
il" : 123, "SI" : "my first string", "S2" : "my second string", "bl" : false
Suggested answer: B, D
asked 23/09/2024
james james
33 questions

Question 129

Report
Export
Collapse

A developer wrote a Visualforce page for Sales Reps to add products to an order. The page takes a URL query parameter, productFamily, which filters the product results. The test method for the filter behavior has an assertion failing due to an incorrect number of results.

Why could the test be failing? (Choose two.)

The test does not call Test.startTest()
The test does not call Test.startTest()
The test does not create product data
The test does not create product data
The test is not run by a System Administrator
The test is not run by a System Administrator
The test does not set the current page reference
The test does not set the current page reference
Suggested answer: B, D
asked 23/09/2024
mr Craig Ferguson
34 questions

Question 130

Report
Export
Collapse

A developer writes the following code:

Salesforce Certified Platform Developer II image Question 130 67777 09232024003105000000

While testing the code, the developer receives the following error message: System.CalloutException : You have uncommitted work pending What should the developer do? (Choose two.)

Use the asyncSend() method of the HTTP class to send the request in async context
Use the asyncSend() method of the HTTP class to send the request in async context
Ensure all callouts are completed prior to executing DML statements
Ensure all callouts are completed prior to executing DML statements
Move the web service callout into an ©future method
Move the web service callout into an ©future method
Use Database.insert (order, true) to immediately commit any database changes
Use Database.insert (order, true) to immediately commit any database changes
Suggested answer: B, C
asked 23/09/2024
Francis Arthur
37 questions
Total 438 questions
Go to page: of 44
Search

Related questions