ExamGecko
Ask Question

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

List of questions

Question 241

Report
Export
Collapse

A company has a custom object Sales_Help_Request__c that has a Lookup relationship to Opportunity. The Sales_Help_Request__c has a number field, Number_of_Hours__c, that represents the amount of time spent on the Sales_Help_Request__c.

A developer is tasked with creating a field, Total_Hours__c, on Opportunity that should be the sum of all of the Number_of_Hours__c values for the Sales_Help_Request__c records related to that Opportunity.

What should the developer use to implement this?

A workflow rule on the Sales_Help_Request__c object
A workflow rule on the Sales_Help_Request__c object
A roll-up summary field on the Opportunity object
A roll-up summary field on the Opportunity object
A trigger on the Opportunity object
A trigger on the Opportunity object
A trigger on Sales_Help_Request__c
A trigger on Sales_Help_Request__c
Suggested answer: D
asked 23/09/2024
Jeremy Cheeseborough
41 questions

Question 242

Report
Export
Collapse

In a VisualForce page with a VisualForce component that has rendered set to false when the page loads, how can a developer ensure it will show on a re-render?

Set the re-render attribute of the component to true.
Set the re-render attribute of the component to true.
Perform a full page refresh since rendered elements cannot be re-rendered without refreshing.
Perform a full page refresh since rendered elements cannot be re-rendered without refreshing.
Set the rendered attribute of the component to true and re-render the component.
Set the rendered attribute of the component to true and re-render the component.
Set the rendered attribute of the component to true and re-render a parent component.
Set the rendered attribute of the component to true and re-render a parent component.
Suggested answer: D
asked 23/09/2024
Christian Andrew TANAP
41 questions

Question 243

Report
Export
Collapse

An org has a requirement that the Shipping Address on the Account must be validated by a thirdparty web service, before the Account is allowed to be inserted.

What is the optimal way to meet this requirement?

Make a callout to the web service from a custom Visualforce controller.
Make a callout to the web service from a custom Visualforce controller.
Make a callout to the web service from a standard Visualforce controller.
Make a callout to the web service from a standard Visualforce controller.
Make a callout to the web service from an after insert trigger.
Make a callout to the web service from an after insert trigger.
Make a callout to the web service from a before insert trigger.
Make a callout to the web service from a before insert trigger.
Suggested answer: B
asked 23/09/2024
Josef Anwar Panerio
37 questions

Question 244

Report
Export
Collapse

A developer needs to store variables to control the style and behavior of a Lightning Web Component. Which feature should be used to ensure that the variables are testable in both Production and all Sandboxes?

Custom Metadata
Custom Metadata
Custom Object
Custom Object
Custom Setting
Custom Setting
Custom Variable
Custom Variable
Suggested answer: A
asked 23/09/2024
Jason Siemens
36 questions

Question 245

Report
Export
Collapse

A developer wrote an Apex class to make several callouts to an external system.

If the URLs used in these callouts will change often, which feature should the developer use to minimize changes needed to the Apex class?

Session Id
Session Id
Connected Apps
Connected Apps
Remote Site Settings
Remote Site Settings
Named Credentials
Named Credentials
Suggested answer: D
asked 23/09/2024
jim eagleton
34 questions

Question 246

Report
Export
Collapse

A company manages information about their product offerings in custom objects named Catalog and Catalog Item. Catalog Item has a master-detail field to Catalog, and each Catalog may have as many as 100,000 Catalog Items.

Both custom objects have a CurrencylsoCode Text field that contains the currency code they should use. If a Catalog's CurrencylsoCode changes, all of its Catalog Items' CurrencylsoCodes should be changed as well.

What should a developer use to update the CurrencylsoCodes on the Catalog Items when the Catalog's CurrencylsoCode changes^5

An after insert trigger on Catalog that updates the Catalog Items if the Catalog's CurrencylsoCode is different
An after insert trigger on Catalog that updates the Catalog Items if the Catalog's CurrencylsoCode is different
An after insert trigger on Catalog Item that updates the Catalog Items if the Catalog's CurrencylsoCode is different
An after insert trigger on Catalog Item that updates the Catalog Items if the Catalog's CurrencylsoCode is different
A Database.Schedulable and Database.Batchable class that queries the Catalog object and updates the Catalog Items if the Catalog CurrencylsoCode is different
A Database.Schedulable and Database.Batchable class that queries the Catalog object and updates the Catalog Items if the Catalog CurrencylsoCode is different
A Database.Schedulable and Database.Batchable class that queries the Catalog Item object and updates the Catalog Items if the Catalog CurrencylsoCode is different
A Database.Schedulable and Database.Batchable class that queries the Catalog Item object and updates the Catalog Items if the Catalog CurrencylsoCode is different
Suggested answer: D
asked 23/09/2024
Muhammad Waheed
41 questions

Question 247

Report
Export
Collapse

A company decides that every time an Opportunity is created, they want to create a follow up Task and assign it to the Opportunity Owner.

What should a developer use to implement the requirements?

A Process Builder on Opportunity
A Process Builder on Opportunity
A trigger on Task
A trigger on Task
A trigger on Opportunity
A trigger on Opportunity
A Process Builder on Task
A Process Builder on Task
Suggested answer: A
asked 23/09/2024
Shafqat Balouch
29 questions

Question 248

Report
Export
Collapse

A developer is developing a reuseable Aura Component that will reside on an sObject Lightning Page with the following HTML snippet:

<aura:component implements="force:hasRecordId,flexipage:availableForAIIPageTypesM>

<div>Hello!</div>

</aura:component> How can the component's Controller get the context of the Lightning Page that the sObject is on without requiring additional test coverage?

Set the sObject type as a component attribute.
Set the sObject type as a component attribute.
Add force:hasSobjectName to the implements.
Add force:hasSobjectName to the implements.
Use the getSObjectTypeQ method in an Apex class.
Use the getSObjectTypeQ method in an Apex class.
Create a design attribute and configure via App builder.
Create a design attribute and configure via App builder.
Suggested answer: B
asked 23/09/2024
Evelina Turco
34 questions

Question 249

Report
Export
Collapse

A developer has working business logic code, but sees the following error in the test class:

You have uncommitted work pending. Please commit or rollback before calling out. What is a possible solution?

Rewrite the business logic and test classes with ©TestVisible set on the callout.
Rewrite the business logic and test classes with ©TestVisible set on the callout.
Set seeAIIData to "true" at the top of the test class, since the code does not fail in practice.
Set seeAIIData to "true" at the top of the test class, since the code does not fail in practice.
Call support for help with the target endpoint, as it is likely an external code error.
Call support for help with the target endpoint, as it is likely an external code error.
Use test.IsRunningTest() before making the callout to bypass it in test execution.
Use test.IsRunningTest() before making the callout to bypass it in test execution.
Suggested answer: D
asked 23/09/2024
Wilfried Bret
30 questions

Question 250

Report
Export
Collapse

A developer needs to implement a system audit feature that allows users, assigned to a custom profile named "Auditors", to perform searches against the historical records in the Account object.

The developer must ensure the search is able to return history records that are between 12 and 24 months old.

Given the code below, which select statement should be inserted below as a valid way to retrieve the Account History records ranging from 12 to 24 month old?

Suggested answer: D
asked 23/09/2024
Coropcianu Mihai
36 questions
Total 438 questions
Go to page: of 44
Search

Related questions