Latest Salesforce PDII First Attempt, Exam real Dumps Updated [Jul-2021]
Get the superior quality PDII Dumps Questions from Actual4Dumps. Nobody can stop you from getting to your dreams now. Your bright future is just a click away!
NEW QUESTION 98
Which statement is true about scheduled Apex? Choose 3 answers
- A. There is no limit on Scheduled Apex jobs because they are executed asynchronously
- B. Scheduled Apex classes can only be defined by extending the Schedule base class.
- C. Scheduled Apex is executed only when system resources are available.
- D. Scheduled Apex only supports asynchronous callouts through the use of @future methods and Apex Batches.
- E. The schedule of an Active scheduled Apex class cannot be updated through the Salesforce User Interface.
Answer: C,D,E
NEW QUESTION 99
Refer to the code snippet below:
When a Lightning web component is rendered, a list of opportunity that match certain criteria should be retrieved from the database and displayed to the end-user.
Which three considerations must the developer implement to make the fetchOpps method available within the Lightning web component?
- A. The fecthOpps method must be annotated with the @ AuraEnabled annotation.
- B. The fetchOpps method must be annotated with the %InvocableMethod annotation.
- C. The fetchOpps method cannot mutate the result set retrieved from the database.
- D. The fetchOpps method must specify the (cacheable =true) attribute
- E. The fetchOpps method must specify the (continustion-true) attribute
Answer: A,C,D
NEW QUESTION 100
REST uses __________.
- A. All of the above
- B. The HTTP class
- C. The HTTPResponse class
- D. The HTTPRequest class
Answer: A
Explanation:
CalloutException happens if an error occurs Classes begin with @RestResource(urlMapping='/yourUrl'), and methods can have annotations such as @HttpGet, @HttpPost, etc
NEW QUESTION 101 
The test method above tests an Apex trigger that the developer knows will make a lot of queries when a lot of Account are simultaneously updated to be customer.
The test method fails at the Line 20 because of too many SOQL queries
What is the correct way to fix this?
The test method above tests an Apex trigger that the developer knows will make a lot of queries when a lot of Accounts are simultaneously updated to be customers.
The test method fails at the Line 20 because of too many SOQL queries.
What is the correct way to fix this?
- A. Add TesLstartTest() before and Test.stop Test() after both Line 7 of the code and Line 20 of the code.
- B. Change the DataFactory class to create fewer Accounts so that the number of queries in the trigger is reduced.
- C. Add TeststartTest() before Line 18 of the code and add Test.stopTest() after line 18 of the code.
- D. Replace most of the Apex Trigger with Process Builder processes to reduce the number of queries in the trigger.
Answer: C
NEW QUESTION 102
What is the transaction limit for the number of SOSL queries?
- A. There is no limit
- B. 200 (synchronous), 100 (async)
- C. 100 (synchronous), 200 (async)
- D. 2,000
- E. 0
Answer: E
NEW QUESTION 103
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 2 answers
- A. Configure a custom field as unique.
- B. Configure a custom field as external ID.
- C. Configure a custom field as Salesforce ID.
- D. Configure a custom field as indexed.
Answer: A,B
NEW QUESTION 104
Choose the correct definition for <apex:pageMessage>
- A. No formatting; displays all errors on a page
- B. Standard Salesforce formatting, shows all errors that occur on page. Can add more messages through the
"ApexPages.addMessage" function - C. A single message, without formatting, that can be associated with a specific component on the page
- D. Standard Salesforce formatting, throws a specific message on a page
Answer: B
NEW QUESTION 105
Refer to the markup below:
A Lightning web component displays the Account name and two custom fields out of 275 that exist on the object. The developer receives complaints that the component performs slowly.
What can the developer do to improve the performance?
A)
B)
C)
D)
- A. Option D
- B. Option C
- C. Option A
- D. Option B
Answer: B
NEW QUESTION 106
What are three benefits of using static resources in Visualforce and Lightning Components? Choose 3 answers
- A. Relative paths can be used in files in static resource archives to refer to other content within the archive.
- B. Static resource files can be packaged into a collection of related files in a zip or jar archive.
- C. Static resource files are automatically minified.
- D. Static resource files do not count against an organization's quota of data storage.
- E. Static resource files can be referenced by using the $Resource global variable instead of hardcoded IDs.
Answer: A,B,E
NEW QUESTION 107
A developer is using a third-party JavaScript library to create a custom user interface in Visualforce. The developer needs to use JavaScript to get data from a controller method in response to a user action. How can the developer accomplish this?
- A. Use to enable JavaScript support for the controller method.
- B. Use the @RemoteAction annotation on the method definition with JavaScript Remoting.
- C. Use to create a JavaScript wrapper for the controller method.
- D. Use the $Controller global variable to access the controller method via JavaScript.
Answer: B
NEW QUESTION 108
A company has a custom object. Order__c, that has a custom picklist field. Status__c, with values of New, In Progress," or Fulfilled and a lookup field, Contact_c, to Contact.
Which SOQL query wrii return a unique list of all the Contact records that have no Fulfilled Orders?
- A. SELECT iD FROM Contact WHERE id NOT IN (SELECT id From order_c WHERE_c = Fulfilled')
- B. SELECT Contact_c FROM Order_c Where Status_c <> ;Fulfilled'
- C. SELECT Contact_c From order_c Where id NOT IN (SELECT id FROM_c Where States_c + Fulfilled')
- D. SELECT id FROM Contact WHERE id NOT IN (SELECT Contact _c FROM order_c Where Status_c = fulfilled')
Answer: D
NEW QUESTION 109
What is the transaction limit for the number of records using QueryLocator?
- A. 50,000
- B. 50,000,000
- C. There is no limit
- D. 100,000
- E. 5,000,000
Answer: B
Explanation:
"Scope" parameter in "executeBatch" can be set up to 2,000 records
NEW QUESTION 110
A large company uses Salesforce across several departments. Each department has its own Salesforce Administrator. It was agreed that each Administrator would have their own sandbox in which to test changes. Recently, users notice that fields that were recently added for one department suddenly disappear without warning. Also, Workflows that once sent emails and created tasks no longer do so. Which two statements are true regarding these issues and resolution? Choose 2 answers
- A. The administrators are deploying their own Change Sets, thus deleting each other's fields from the objects in production.
- B. Page Layouts should never be deployed via Change Sets, as this causes Workflows and Field-level Security to be reset and fields to disappear.
- C. A sandbox should be created to use as a unified testing environment instead of deploying Change Sets directly to production.
- D. The administrators are deploying their own Change Sets over each other, thus replacing entire Page Layouts and Workflows in Production
Answer: C,D
NEW QUESTION 111
What is the recommended approach to create test data when testing Apex that involves Pricebooks, PricebookEntries, and Products?
- A. Use the isTest (SeeAllData=true) annotation on the entire Test Class to allow your Test Methods access to the standard Pricebook.
- B. Insert a new standard Pricebook record within your Test Method so that it can be used with other test records.
- C. Use the Test.getStandardPricebookId() method to get theId of the standard Pricebook so that it can be used with other test records.
- D. Use the isTest (SeeAllData=true) annotation on Test Methods that require access to the standard Pricebook.
Answer: C
NEW QUESTION 112
The SOAP API...
- A. Provides a powerful, convenient, and simple REST-based web services interface for interacting with Salesforce. Its advantages include ease of integration and development, and it's an excellent choice of technology for use with mobile applications and web projects
- B. Is based on REST principles and is optimized for loading or deleting large sets of data. You can use it to query, queryAll, insert, update, upsert, or delete many records asynchronously by submitting batches
- C. Is used to to retrieve, deploy, create, update, or delete customizations for your org. The most common use is to migrate changes from a sandbox or testing org to your production environment
- D. Is used to to create, retrieve, update or delete records, such as accounts, leads, and custom objects, and allows you to allows you to maintain passwords, perform searches, and much more
Answer: D
NEW QUESTION 113
What should be added to the setup, in the location indicated, for the unit test above to create the controller extension for the test?
A)
B)
C)
D)
- A. Option D
- B. Option B
- C. Option A
- D. Option C
Answer: B
NEW QUESTION 114
What is a recommended practice with regard to the Apex CPU limit? Choose 2 answers
- A. Avoid nested Apex iterations.
- B. Use Map collections to cache sObjects.
- C. Reduce view state in Visualforce pages.
- D. Optimize SOQL query performance.
Answer: A,B
NEW QUESTION 115
Global with sharing class MyRemoter { public String accountName { get; set; } public static Account account { get; set; } public AccountRemoter(} {} @RemoteAction global static Account getAccount (String acccuntName) { account = [SELECT Id, Name, NumberOfEmployees FROM Account WHERE Name = :accountName]; return account; } } Consider the Apex class above that defines a RemoteAction used on a Visualforce search page. Which code snippet will assert that the remote action returned the correct Account?
- A. Account a = controller.getAccount('TestAccount');
System.assertEquals(, 'TestAccount', a.Name } ; - B. MyRemoter remote = new MyRemoter();
Account a = remote.getAccount ({'TestAccount');
System.assertEquals, 'TestAcccunt', a.Name -; - C. MyRemoter remote = new MyRemoter('TestAccount'};
Account a = remote.getAccount {);System.assertEquals(, ''TestAccount', a.Name -; - D. Account a = MyRemoter.getAccount ('TestAccount'):
System.assertEquals{ 'TestAccount', a.Name };
Answer: D
NEW QUESTION 116
Which of the following about Dynamic Apex is incorrect?
- A. You can retrieve the sObject type from an Id by calling .getSObjectTypeQ
- B. Schema.getGlobalDescribeQ gives you a map of all sObject
- C. In dynamic SOQL, you can use bind variables and bind variable fields
- D. getDescribe() can get you a variety of info on a particular object/field
Answer: C
Explanation:
Explanation
Explanation/Reference:
While you can use simple bind variables in dynamic SOQL, you cann|ot use bind variable fields (e.g. :myVariable.field1_c) Use escapeSingleQuotes to prevent SOQL injection
NEW QUESTION 117
A developer notices the execution of all the test methods in a class takes a long time to run, due to the initial setup of all the test data that is needed to perform the tests.
What should the developer do to speed up test execution?
- A. Ensure proper usage of test data factory in all test methods
- B. Define a method that creates test data and annotate with @testSetup
- C. Reduce the amount of test methods in the class
- D. Define a method that creates test data and annotate with @createData
Answer: B
NEW QUESTION 118
A developer is debugging an Apex-based order creation process that has a requirement to have three savepoints, SP1, SP2, and SP3 (created in order), before the final execution of the process.
During the final execution process, the developer has a routine to roll back to SP1 for a given condition. Once the condition is fixed, the code then calls a roll back to SP3 to continue with final execution. However, when the roll, back to SP3 is called, a runtime error occurs.
Why does the developer receive a runtime error?
- A. The developer has too many DML statements between the savepoints.
- B. SP3 became invalid when SP1 was rolled back.
- C. The developer should have called SP2 before calling SP3.
- D. The developer used too many savepoints in one trigger session.
Answer: B
NEW QUESTION 119
......
Salesforce Practice Test Engine with PDII Questions: https://drive.google.com/open?id=1OT7c6V1I8ORHOdmrnxtcRsJm6EfftGhE
Guaranteed Success with Valid Salesforce PDII Dumps: https://www.actual4dumps.com/PDII-study-material.html