ExamGecko
Ask Question

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

List of questions

Question 231

Report
Export
Collapse

ABC Company has an Apex process that makes multiple extensive database operation and web service callouts. The database processes and web services can take a length time to run and must be run sequentially.

How should the developer write this Apex code without running into governor limits and system limitations?

Use Limits class to stop entire process once governor limits are reached.
Use Limits class to stop entire process once governor limits are reached.
Use multiple @future methods for each process and callout.
Use multiple @future methods for each process and callout.
Use Queueable Apex to chain the jobs to run sequentially.
Use Queueable Apex to chain the jobs to run sequentially.
Use Apex Scheduler to scheduled each process.
Use Apex Scheduler to scheduled each process.
Suggested answer: A
asked 23/09/2024
Maria Deras
40 questions

Question 232

Report
Export
Collapse

A developer is integrated with a legacy on-premises SQL database.

What should the developer use to ensure the data being integrated is matched to the right records in Salesforce?

External Object
External Object
Lookup field
Lookup field
Formula field
Formula field
External Id field
External Id field
Suggested answer: D
asked 23/09/2024
DOMINIC FERNANDEZ
40 questions

Question 233

Report
Export
Collapse

A developer wrote a test class that successfully asserts a trigger on Account. It fires and updates data correctly in a sandbox environment.

A salesforce admin with a custom profile attempts to deploy this trigger via a change set into the production environment, but the test class fails with an insufficient privileges error.

What should a developer do to fix the problem?

Add system.runAs ( ) to the best class to execute the trigger as a user with the correct object permissions.
Add system.runAs ( ) to the best class to execute the trigger as a user with the correct object permissions.
Configure the production environment to enable "Run All tests as Admin User."
Configure the production environment to enable "Run All tests as Admin User."
Verify that Test, statement ( ) is not inside a For loop in the test class.
Verify that Test, statement ( ) is not inside a For loop in the test class.
Add seeAllData=true to the test class to work within the sharing model for the production environment.
Add seeAllData=true to the test class to work within the sharing model for the production environment.
Suggested answer: A
asked 23/09/2024
Liusel Herrera Garcia
43 questions

Question 234

Report
Export
Collapse

A developer has requirement to query three fields (id, name, Type) from an Account and first and last names for all Contacts associated with the Account.

Which option is the preferred optimized method to achieve this for the Account named 'Ozene Electronics'?

Account a = (SELECT ID, Name, Type from Account where name= Ozone Electronics;) list 1contacts = (SELECT firstname, lastname from Contacts where accountid=: a -ID0;
Account a = (SELECT ID, Name, Type from Account where name= Ozone Electronics;) list 1contacts = (SELECT firstname, lastname from Contacts where accountid=: a -ID0;
Account a = (SELECT ID, Name, Type, (select contat,firstName, Contact,LastName from Account, Contacts) from Account where name; Ozone Electronic' Limit 1 );
Account a = (SELECT ID, Name, Type, (select contat,firstName, Contact,LastName from Account, Contacts) from Account where name; Ozone Electronic' Limit 1 );
List 1Accounts = (Select ID, Name, Type from Account Join (Select ID, firstname, lastname form Contact where contact account , name 'ozone electronics));
List 1Accounts = (Select ID, Name, Type from Account Join (Select ID, firstname, lastname form Contact where contact account , name 'ozone electronics));
List 1Contacts = new list ( ); for(Contact c ; 1Select firstname, lastname Account, Name Account,ID Account, Type from Contact where Account: Name=' electronics')) ( iContacts.add(c);)
List 1Contacts = new list ( ); for(Contact c ; 1Select firstname, lastname Account, Name Account,ID Account, Type from Contact where Account: Name=' electronics')) ( iContacts.add(c);)
Suggested answer: B
asked 23/09/2024
Nigel Choji
45 questions

Question 235

Report
Export
Collapse

Consider the following code snippet, depicting an Azure component:

Salesforce Certified Platform Developer II image Question 235 67882 09232024003105000000

Which two interfaces can the developer implement to make the component available as a quick action?

Choose 2 answers

Force:lightningQuicAction
Force:lightningQuicAction
Force:hasRecordId
Force:hasRecordId
Force hasObjectName
Force hasObjectName
Lightning QuickActionAPI
Lightning QuickActionAPI
Force:lightningQuickActionWithoutHeader
Force:lightningQuickActionWithoutHeader
Suggested answer: A, E
asked 23/09/2024
Siegfried Paul
33 questions

Question 236

Report
Export
Collapse

Universal Containers stores user preferences in a Hierarchy Custom Setting, User_prefs_c, with a Checkbox field, show_Help_c, Company-Level defaults are stored at the organizational level, but may be overridden at the user level, If a user has not overridden preferences, then the defaults should be used.

How should the Show_Help_c preference be retrieved for the current user?

Boolean show = User_Prefs_c, getinstance( ), Show_Help _c;
Boolean show = User_Prefs_c, getinstance( ), Show_Help _c;
Boolean show = User_Prefs_c, getValues ( ). Show _Help_c;
Boolean show = User_Prefs_c, getValues ( ). Show _Help_c;
Boolean show = User_Prefs_c, getvaluesUserInfo.getUserid() ).Show_Help_c;
Boolean show = User_Prefs_c, getvaluesUserInfo.getUserid() ).Show_Help_c;
Boolean show = User prefs_c, Show_Help_c;
Boolean show = User prefs_c, Show_Help_c;
Suggested answer: C
asked 23/09/2024
Pablo Hilario
38 questions

Question 237

Report
Export
Collapse

An org has a requirement that addresses on Contacts and Accounts should be normalized to a company standard by Apex code any time that they are saved.

What is the optimal way to implement this?

Apex trigger on Account that calls the Contact trigger to normalize the address
Apex trigger on Account that calls the Contact trigger to normalize the address
Apex trigger on Contact that calls the Account trigger to normalize the address
Apex trigger on Contact that calls the Account trigger to normalize the address
Apex trigger on Account that and Account that normalized the address
Apex trigger on Account that and Account that normalized the address
Apex trigger on Account and Account that call a helper class to normalize the address
Apex trigger on Account and Account that call a helper class to normalize the address
Suggested answer: D
asked 23/09/2024
Gift Thanyane
33 questions

Question 238

Report
Export
Collapse

Which technique can run logic when an Aura Component is loaded?

Use an aura:handler 'init" event to call a function.
Use an aura:handler 'init" event to call a function.
Use the connectedCallback(0 method.
Use the connectedCallback(0 method.
Use the standard doinit function in the controller.
Use the standard doinit function in the controller.
Call $A. enqueueAction passing in the method to call.
Call $A. enqueueAction passing in the method to call.
Suggested answer: A
asked 23/09/2024
David Gallegos
41 questions

Question 239

Report
Export
Collapse

A developer wants to write a generic Apex method that will compare the Salesforce Name filed between any two object records, for example to compare the Name field of an Account and an Opportunity; or the name of an Account and a Contact.

How should the developer do this?

Use a String.replace( ) method to parse the contents of each Name field.
Use a String.replace( ) method to parse the contents of each Name field.
Invoke a Schema,describe() function to compare the values of each Name field.
Invoke a Schema,describe() function to compare the values of each Name field.
Cast each object into an sObject and use sObject.get(Name') to compare the Name fields.
Cast each object into an sObject and use sObject.get(Name') to compare the Name fields.
Use the salesforce metadata API to extract the value of each object and compare the name fields
Use the salesforce metadata API to extract the value of each object and compare the name fields
Suggested answer: C

Explanation:

Topic 2, Exam Pool B

asked 23/09/2024
Rutger Pels
32 questions

Question 240

Report
Export
Collapse

When calling a RESTful web service, a developer receives a JSON payload that has a data hierarchy that is nested three levels deep. How can the developer describe the external data?

Deserialize the data untyped and then process it.
Deserialize the data untyped and then process it.
Declare a class with three levels and deserialize the JSON typed with this class.
Declare a class with three levels and deserialize the JSON typed with this class.
Use the ANT migration tool, the custom metadata API, or the Dataloader.
Use the ANT migration tool, the custom metadata API, or the Dataloader.
Use middleware to flatten the JSON and consume it as a new custom object.
Use middleware to flatten the JSON and consume it as a new custom object.
Suggested answer: A
asked 23/09/2024
Andre van Mierlo
37 questions
Total 438 questions
Go to page: of 44
Search

Related questions