UPDATED [2022] Pass Salesforce PDII Exam in First Attempt Guaranteed [Q97-Q113]

Share

UPDATED [2022] Pass Salesforce PDII Exam in First Attempt Guaranteed

Pass PDII Exam Latest Practice Questions

NEW QUESTION 97
Universal Containers implements a private sharing model for the Convention_Attendence_c custom object. As part of a new quality assurance effort, the company created an Event___Reviewer__c user lookup field on the object. Management wants the event reviewer to automatically gain Read/write access to every record they are assigned to.
What is the best approach to ensure the assigned reviewer obtains Read/Write access to the record?

  • A. Create a Before Insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.
  • B. Create a criteria-based sharing rule on the Convention Attendee custom object to share the records the a group of Event Reviewers.
  • C. Create criteria-based sharing rules on the Convention Attendee custom object to share the records with the Event Reviewers.
  • D. Create an After Insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.

Answer: D

 

NEW QUESTION 98
What is the transaction limit for the number of DML statements allowed?

  • A. 0
  • B. 2,000
  • C. 1
  • D. 100 (synchronous), 200 (async)
  • E. 200 (synchronous), 100 (async)

Answer: C

Explanation:
Includes Approval functions, rollbacks/savepoints, and System.runAs

 

NEW QUESTION 99
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. MyRemoter remote = new MyRemoter('TestAccount'};
    Account a = remote.getAccount {);System.assertEquals(, ''TestAccount', a.Name -;
  • B. Account a = controller.getAccount('TestAccount');
    System.assertEquals(, 'TestAccount', a.Name } ;
  • C. Account a = MyRemoter.getAccount ('TestAccount'):
    System.assertEquals{ 'TestAccount', a.Name };
  • D. MyRemoter remote = new MyRemoter();
    Account a = remote.getAccount ({'TestAccount');
    System.assertEquals, 'TestAcccunt', a.Name -;

Answer: C

 

NEW QUESTION 100
After a Platform Event is defined in a Salesforce org, events can be published via which two mechanisms?
Choose 2 answers

  • A. External Apps require a custom Apex web service.
  • B. Internal Apps can use Process Builder.
  • C. External Apps can use the standard Streaming API.
  • D. internal Apps can use Outbound Messages

Answer: B,D

 

NEW QUESTION 101
An Apex Trigger creates a Contract record every time an Opportunity record is marked as Closed and Won.
This trigger is working great, except (due to a recent acquisition) historical Opportunity records need to be loaded into the Salesforce instance. When a test batch of records are loaded, the Apex Trigger creates Contract records. A developer is tasked with preventing Contract records from being created when mass loading the Opportunities, but the daily users still need to have the Contract records created. What is the most extendable way to update the Apex Trigger to accomplish this?

  • A. Use a Hierarchy Custom Setting to disable the Trigger for the user who does the data loading.
  • B. Add a Validation Rule to the Contract to prevent Contract creation by the user who does the data loading.
  • C. add the Profile Id of the user who does the data loading to the Trigger so the Trigger won't fire for this user.
  • D. Use a List Custom Setting to disable the Trigger for the user who does the data loading.

Answer: A

 

NEW QUESTION 102
A developer is writing a Visualforce page to display a list of all of the checkbox fields found on a custom object. What is the recommended mechanism the developer should use to accomplish this?

  • A. Schema class
  • B. Schema Builder
  • C. Apex API
  • D. Metadata API

Answer: A

 

NEW QUESTION 103
A developer writes the following Apex trigger so that when a Case is closed, a single Survey record is created for that Case. The issue is that multiple Survey_c records are being created per Case.

What could be the cause of this issue?

  • A. A workflow rule is firing with a Field Update action
  • B. A workflow rule is firing with a Create Task action
  • C. A user is creating the record as Closed
  • D. A user is editing the record multiple times

Answer: D

 

NEW QUESTION 104
What is the transaction limit on the max timeout for all callouts?

  • A. 60 seconds
  • B. 60 seconds (synchronous); 200 seconds (async)
  • C. 120 seconds
  • D. 120 seconds (synchronous); 200 seconds (async)
  • E. There is no limit

Answer: C

 

NEW QUESTION 105
A developer has generated Apex code from a WSDL for an external web service. The web service requires Basic authentication.
What code should the developer use to authenticate?

  • A. Http.setHeader ('Authorization' , 'Basic QthZGprjpchVulHNchFtZQ!)
  • B. stub.authentication.put ('Authorization','Basic QthZGprjpchVulHNchFtZQ')
  • C. Http.setAuthentication('Basic QthZGprjpchVulHNchFtZQ')
  • D. stub.inputHttpHeaders_x.put('Authorization' , 'Basic QthZGprJpchVulHNchFtZQ')

Answer: D

 

NEW QUESTION 106
A developer is trying to decide between creating a Visualforce component or a Lightning component for a custom screen. Which functionality consideration impacts the final decision?

  • A. Does the screen need to be accessible from the Lightning Experience UI?
  • B. Does the screen need to be rendered as a PDF?
  • C. Will the screen make use of a JavaScript framework?
  • D. Will the screen be accessed via a mobile app?

Answer: C

 

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

  • A. Test methods must run the batch between Test.startTest() and Test.stopTest()
  • B. Test methods must use the @isTest (SeeAllData=true) annotation
  • C. Test methods must execute the batch with a scope size of less than 200 records
  • D. Test methods must call the batch execute() method once

Answer: A,C

 

NEW QUESTION 108
Which two relationship queries use the proper syntax? Choose 2 answers

  • A. SELECT Id, Name, Account.Name FROM Contact WHERE Account.Industry = 'Media'
  • B. SELECT Name, (SELECT LastName FROM Contacts__r) FROM Account
  • C. SELECT Id, Name, Account __r.Name FROM Contact WHERE Account r.Industry = 'Media'
  • D. SELECT Name, (SELECT LastName FROM Contacts) FROM Account

Answer: B,D

 

NEW QUESTION 109
A developer needs to write tests to ensure that code doesn't fail when it is deployed to a different organization.
The developer also must ensure that the code works properly with organization sharing rules and ensure that the code mitigates errors due to limits. How can the developer meet these requirements? Choose 2 answers

  • A. Create all test data before calling the Test. startTest () and Test .stopTest () methods.
  • B. Handle all exceptions that are caught by adding an empty catch ( Exception e) statement.
  • C. Use the runAs ( ) method to test the application in different user contexts.
  • D. Use SeeAllData=true to avoid delaying tests due to creating test data.

Answer: A,C

 

NEW QUESTION 110
A developer Is asked to develop a new AppExthange application. A feature of the program creates Survey records when a Case reaches a certain stage and Is of a certain Record Type. This feature needs to be configurable, as different Salesforce instances require Surveys at different times. Additionally, the out-of-the-box AppExchange app needs to come with a set of best practice settings that apply to most customers.
What should the developer use to store and package the custom configuration settings for the app?

  • A. Process Builder
  • B. Custom Settings
  • C. Custom Objects
  • D. Custom Metadata

Answer: C

 

NEW QUESTION 111
A developer created three Rollup Summary fields: Total_timesheets_c, Total_Approved_timesheet_c and Total_project_Timesheet_c in the custom object, project _c Now, the developer is tasked with created a new field to show the ratio between and approved

  • A. A formula field will calculate the value retroactively for existing records.
  • B. Using a formula field reduces maintenance overhead.
  • C. No test methods will be executed during deployment.
  • D. A test class that validates the formula field is needed for deployment.

Answer: B,C

 

NEW QUESTION 112
The Salesforce admin at Cloud Kicks created a custom object called Region__c to store all postal zip codes in the United States and the Cloud
Kicks sales region the zip code belongs to.

Cloud Kicks wants a trigger on the Lead to populate the Region based on the Lead's zip code.
A)

B)


D)

  • A. Option D
  • B. Option C
  • C. Option A
  • D. Option B

Answer: C

 

NEW QUESTION 113
......

Salesforce PDII Study Guide Archives : https://testking.vceengine.com/PDII-vce-test-engine.html