Exam Code: Platform-Developer-II (Practice Exam Latest Test Questions VCE PDF)
Exam Name: Platform Developer II
Certification Provider: Salesforce
Free Today! Guaranteed Training- Pass Platform-Developer-II Exam.
Check Platform-Developer-II free dumps before getting the full version:
NEW QUESTION 1
@isTest static void testAccountUpdate() { Account acct = new Account({Name = 'Test'); acct.Integration Updated_c = false; insert acct; CalloutUtil.sendAccountUpdate (acct.Id); Account acctAfter = [SELECT Id, Integration Updated_c FROM Account WHERE Id = :acct.Id] [0]; System.assert(true, acctAfter.Integration_Updated_c); } The test method above calls a web service that updates an external system with Account information and sets the Account's Integration_Updated c checkbox to True when it completes. The test fails to execute and exits with an error: "Methods defined as TestMethod do not support Web service callouts." What is the optimal way to fix this?
Answer: B
NEW QUESTION 2
How would you test a web service?
Answer: D
NEW QUESTION 3
There is an Apex controller and a Visualforce page in an org that displays records with a custom filter consisting of a combination of picklist values selected by the user.
The page takes too long to display results for some of the input combinations, while for other input choices it throws the exception, *Maximum view state size limit exceeded.
What step should the developer take to resolve this issue?
Answer: C
NEW QUESTION 4
What is the optimal technique a developer should use to programmatically retrieve Global Picklist options in a Test Method?
Answer: B
NEW QUESTION 5
Which of the following about Dynamic Apex is incorrect?
Answer: D
Explanation:
While you can use simple bind variables in dynamic SOQL, you cann|ot use bind variable fields
:myVariable.field1_c)
Use escapeSingleQuotes to prevent SOQL injection
NEW QUESTION 6
A company has a custom object, Sales Demo Request, that has a lookup to an Opportunity. It is required that a Sales Demo Request record be created when an Opportunity's Probability is greater than 50%. What is the optimal way to automate this?
Answer: C
NEW QUESTION 7
Which two queries are selective SOQL queries and can be used for a large data set of 200,000 Account records? Choose 2 answers
Answer: CD
NEW QUESTION 8
A developer is creating a Lightning web component that displays a list of records in a lightning-datatable. After saving a new record to the database, the list is not updating.
What should the developer change in the code above for this to happen?
Answer: D
NEW QUESTION 9
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); } }
Answer: C
NEW QUESTION 10
The test method above calls an @future method that increments the Number_of_Times_Viewed___c value. The assertion is failing because the Number_of_Times_Viewed___c equals 0. What is the optimal way to fix this?
Answer: A
NEW QUESTION 11
Which statement is true regarding savepoints?
Answer: C
NEW QUESTION 12
What is the optimal syntax for adding a link to a case in a Visualforce page? (Choose two.)
Answer: BC
NEW QUESTION 13
What should a developer use to query all Account fields for the Acme account in their sandbox?
Answer: D
NEW QUESTION 14
Given a list of Opportunity records named opportunityList, which code snippet is best for querying all Contacts of the Opportunity's Account?
A)
B)
C)
D)
Answer: A
NEW QUESTION 15
A company has a Request__c object that has a lookup to the Opportunity object and a custom field. Status__c, with values of Open,' Closed, and Invalid.' An Opportunity should not be allowed to be deleted if there are any Request__c records related to it that have a Status__c value of Open or 'Closed.'
what is the optimal way to enforce the requirement to prevent deletion?
Answer: C
NEW QUESTION 16
What is the transaction limit for the number of records using QueryLocator?
Answer: B
Explanation:
"Scope" parameter in "executeBatch" can be set up to 2,000 records
NEW QUESTION 17
A managed package uses a list of country ISO codes and country names as references data in many different places.. managed package Apex code.
What is the optimal way to store and retrieve the list?
Answer: C
NEW QUESTION 18
An environment has two Apex Triggers: an after-update trigger on Account and an after-update trigger on Contact. The Account after-update trigger fires whenever an Account's address is updated, and it updates every associated Contact with that address. The Contact after-update trigger fires on every edit, and it updates every Campaign Member record related to the Contact with the Contact's state.
Consider the following: A mass update of 200 Account records' addresses, where each Account has 50 Contacts. Each Contact has 1 Campaign Member. This means there are 10,000 Contact records across the Accounts and 10,000 Campaign Member records across the contacts.
What will happen when the mass update occurs?
Answer: B
NEW QUESTION 19
A company exposes a REST web service and wants to establish two-way SSL between Salesforce and the REST web service. A certificate signed by an appropriate certificate authority has been provided to the developer.
What modification is necessary on the Salesforce side? (Choose two.)
Answer: AB
NEW QUESTION 20
Assuming the CreateOneAccount class creates one account and implements the Queuetable interface, which syntax tests the Apex code?
A)
B)
C)
D)
Answer: B
NEW QUESTION 21
......
P.S. Easily pass Platform-Developer-II Exam with 196 Q&As Dumps-hub.com Dumps & pdf Version, Welcome to Download the Newest Dumps-hub.com Platform-Developer-II Dumps: https://www.dumps-hub.com/Platform-Developer-II-dumps.html (196 New Questions)