ExamGecko
Ask Question

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

List of questions

Question 101

Report
Export
Collapse

The Contact object has a custom field called "Zone." Its data type is "Text" and field length is 3. What is the outcome after executing the following code snippet in the org?

Salesforce Certified Platform Developer II image Question 101 67748 09232024003105000000

Both inserts succeed and the contact record that has the Zone value of 'PI'IT is set to NULL
Both inserts succeed and the contact record that has the Zone value of 'PI'IT is set to NULL
A partial insert succeeds and the contact record that has the Zone value 'IAD1 is inserted
A partial insert succeeds and the contact record that has the Zone value 'IAD1 is inserted
Both inserts succeed and the contact record that has the Zone value of PITT is truncated
Both inserts succeed and the contact record that has the Zone value of PITT is truncated
An unhandled DML exception is thrown and no contact records are inserted
An unhandled DML exception is thrown and no contact records are inserted
Suggested answer: D
asked 23/09/2024
Francisli Lilles
42 questions

Question 102

Report
Export
Collapse

Which statement is true regarding the use of user input as part of a dynamic SOQL query?

Free text input should not be allowed, to avoid SOQL injection
Free text input should not be allowed, to avoid SOQL injection
The String.format() method should be used to prevent injection
The String.format() method should be used to prevent injection
Quotes should be escaped to protect against SOQL injection
Quotes should be escaped to protect against SOQL injection
The string should be URL encoded by the input form to prevent errors
The string should be URL encoded by the input form to prevent errors
Suggested answer: C
asked 23/09/2024
Anouar Ettahery
35 questions

Question 103

Report
Export
Collapse

A developer has written the following method: static void processList(List<sobject> input){ Which code block can be used to call the method?

processList (ace)
processList (ace)
processList ([FIND 'Acme" 'RETURNING Account])
processList ([FIND 'Acme" 'RETURNING Account])
processList([SELECT Id, Name FROM sObject WHERE Type = 'Account'])
processList([SELECT Id, Name FROM sObject WHERE Type = 'Account'])
for Account ace : [SELECT Id, Name FROM Account])
for Account ace : [SELECT Id, Name FROM Account])
Suggested answer: C
asked 23/09/2024
Aidan Lear
49 questions

Question 104

Report
Export
Collapse

A developer needs to design a custom object that will be integrated into a back-end system.

What should the developer do to ensure good data quality and to ensure that data imports, integrations, and searches perform well? (Choose two.)

Configure a custom field as unique
Configure a custom field as unique
Configure a custom field as indexed
Configure a custom field as indexed
Configure a custom field as external ID
Configure a custom field as external ID
Configure a custom field as Salesforce ID
Configure a custom field as Salesforce ID
Suggested answer: A, C
asked 23/09/2024
Graham Munengami
33 questions

Question 105

Report
Export
Collapse

A developer encounters an error that states that the Apex heap size is exceeded. Which technique may reduce heap size?

Add the transient keyword to the variable definition
Add the transient keyword to the variable definition
Move the variable definition inside the scope of the function
Move the variable definition inside the scope of the function
Use static variables instead of instance variables
Use static variables instead of instance variables
Use SOQL for loops instead of standard SOQL queries
Use SOQL for loops instead of standard SOQL queries
Suggested answer: D
asked 23/09/2024
Emily Luijten
46 questions

Question 106

Report
Export
Collapse

A developer has a Debug method within a class, which is invoked hundreds of times.

What is the optimal functionality in the Developer Console to count the number of calls made to the method?

The "Execution Log" Panel
The "Execution Log" Panel
The "Execution Stack" Panel
The "Execution Stack" Panel
The "Executed Units" tab under the Execution Overview Panel
The "Executed Units" tab under the Execution Overview Panel
The "Execution Tree" tab under the Stack Tree Panel
The "Execution Tree" tab under the Stack Tree Panel
Suggested answer: C
asked 23/09/2024
Stefan Lundmark
44 questions

Question 107

Report
Export
Collapse

What is a consideration when testing batch Apex? (Choose two.)

Test methods must execute the batch with a scope size of less than 200 records
Test methods must execute the batch with a scope size of less than 200 records
Test methods must call the batch execute() method once
Test methods must call the batch execute() method once
Test methods must use the @isTest (SeeAIIData=true) annotation
Test methods must use the @isTest (SeeAIIData=true) annotation
Test methods must run the batch between TeststartTestQ and Test.stopTestQ
Test methods must run the batch between TeststartTestQ and Test.stopTestQ
Suggested answer: A, D
asked 23/09/2024
CARL COUCH
44 questions

Question 108

Report
Export
Collapse

A custom field Exec_Count_c of type Number is created on an Account object. An account record with value of "1" for a: Exec__Count_c is saved. A workflow field update is defined on the Exec_Count_c field, to increment its value every time an account record is created or updated. The following trigger is defined on the account: trigger ExecOrderTrigger on Account (before insert, before update, after insert, after update){ for (Account accountlnstance: Trigger.New){ if (Trigger . isBefore){ accountlnstance Exec_Count_c += 1; } System, debug (accountlnstance.Exec_Count_c); } }

1,2,3,3
1,2,3,3
1,2,3,4
1,2,3,4
2, 2, 4, 4
2, 2, 4, 4
2,2,3,3
2,2,3,3
Suggested answer: C
asked 23/09/2024
Sathiyaraj Arulprakasam
47 questions

Question 109

Report
Export
Collapse

A developer is building a Visualforce page that interacts with external services.

Which interface should the developer implement to test this functionality? (Choose two.)

HTTPCalloutMock
HTTPCalloutMock
HTTPRequestMock
HTTPRequestMock
HTTPResponseMock
HTTPResponseMock
StaticResourceCalloutMock
StaticResourceCalloutMock
Suggested answer: A, D
asked 23/09/2024
Pedro Pereira
36 questions

Question 110

Report
Export
Collapse

A developer needs to create a Lightning page for entering Order Information. An error message should be displayed if the zip code entered as part of the Order's shipping address is not numeric.

What is a recommended way for the error message be displayed to the end user?

Use the apex:message tag to display errors
Use the apex:message tag to display errors
Use the aura:component tag to display errors
Use the aura:component tag to display errors
Use the uhoutputText tag to display errors
Use the uhoutputText tag to display errors
Use the uhinputDefaultError tag to display errors
Use the uhinputDefaultError tag to display errors
Suggested answer: D
asked 23/09/2024
Javier Portabales
40 questions
Total 438 questions
Go to page: of 44
Search

Related questions