PDII Practice Test Questions

193 Questions


Instead of waiting to send emails to support personnel directly from the finish method of a batch Apex process , Universal Containers wants to notify an external system in the event that an unhandled exception occurs. What is the appropriate publish/subscribe logic to meet this requirement?


A. Publish the error event using the Eventbus. publish () method.


B. No publishing is necessary. Have the external system subscribe to the BatchapexErrorEvent.


C. Publish the error event using the addError method.


D. Publish the error event with a Flow.





B.
  No publishing is necessary. Have the external system subscribe to the BatchapexErrorEvent.


Universal Containers stores user preferences in a hierarchy custom setting, user Prefs_c, with a checkbox field, show _help co. 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?


A. Boolean show = User_Prefa_ c.getValuea().Show_Help_ co;


B. Boolean show = User Prefs c.getValues(UserInfo.getUserid{)).Show_Help c;


C. Boolean show = User_Prefs_c.getlnstance(].Show Help c;


D. Boolean show = User Prefs_c.show Melp_c;





B.
  Boolean show = User Prefs c.getValues(UserInfo.getUserid{)).Show_Help c;


A corporation has many different Salesforce orgs, with some different objects and some common objects, and wants to build a single Java application that can create, retrieve, and update common object records in all of the different orgs. Which method of integration should the application use?


A. SOAP API with the Partner WSDL


B. Apex REST Web Service


C. SOAP API with the Enterprise WSDL


D. Metadata APT





A.
  SOAP API with the Partner WSDL


For compliance purposes, a company is required to track long-term product usage in their org. The information that they need to log will be collected from more than one object and, over time, they predict they will have hundreds of millions of records. What should a developer use to implement this?


A. Setup audit trail


B. Field audit trail


C. Big objects


D. Field history tracking





C.
  Big objects


A developer is tasked with creating a Lightning web component that allows users to create a Case for a selected product, directly from a custom Lightning page. The input fields in the component are displayed in a non-linear fashion on top of an image of the product to help the user better understand the meaning of the fields. Which two components should a developer use to implement the creation of the Case from the Lightning web component? (Choose two answers).


A. lightning-record-edit-form


B. lightning-input


C. lightning-record-form


D. lightning-input-field





A.
  lightning-record-edit-form

D.
  lightning-input-field

Which two scenarios require an Apex method to be called imperatively from a Lightning web component? (Choose two.)


A. Calling a method that makes a web service callout


B. Calling a method that is not annotated with cacheable=true


C. Calling a method with the click of a button


D. Calling a method that is external to the main controller for the Lightning web component





A.
  Calling a method that makes a web service callout

B.
  Calling a method that is not annotated with cacheable=true


A Salesforce Platform Developer is leading a team that is tasked with deploying a new application to production. The team has used source-driven development, and they want to ensure that the application is deployed successfully. What tool or mechanism should be used to verify that the deployment is successful?


A. Force.com Migration Tool


B. Salesforce DX CLI


C. Apex Test Execution


D. Salesforce Inspector





B.
  Salesforce DX CLI




Explanation:

The Salesforce CLI with Salesforce DX can be used to execute and verify the deployment of metadata to production. It allows the developer to run specified tests and ensure that the deployment meets all required conditions for success.

Which code snippet processes records in the most memory efficient manner, avoiding governor limits such as "Apex heap size too large"?


A. List opportunities = [SELECT Id, Amount FROM Opportunity]; for(Opportunity opp : opportunities) { // Perform operation here


B. for(Opportunity opp : [SELECT Id, Amount FROM Opportunity]) { // perform operation here


C. Map opportunities = new Map([SELECT Id, Amount FROM Opportunity]); for(Id oppId : opportunities.keySet()) { // perform operation here


D. List opportunities = Database.query('SELECT Id, Amount FROM Opportunity'); for(Opportunity opp : opportunities) { // perform operation here





B.
  for(Opportunity opp : [SELECT Id, Amount FROM Opportunity]) { // perform operation here




Explanation:

SOQL For Loops process records in smaller, manageable batches of 200, reducing memory usage and avoiding governor limits like "Apex heap size too large." Unlike other options that load all records into memory, SOQL For Loops handle large datasets efficiently by querying incrementally.

Your organization always stresses the importance of on-time delivery and reliability. A manager has detected that your team’s progress is too slow. They feel that your team's velocity needs to be 10% higher. The organization expects you, as the Scrum Master, to make it happen. How do you respond? (Choose two.)


A. You help management understand that it typically takes a few Sprints for a team to gradually increase the velocity up to the level expected. Meanwhile you present this to the team as a challenge and a company goal, leaving it however up to them to figure out exactly how to achieve this.


B. You educate management that it is the Scrum Team's responsibility to improve their velocity. You invite management to the next Sprint Retrospective to brainstorm on how they can improve.


C. You explain how a Scrum Team uses the velocity of a Sprint primarily to forecast work for the next Sprint, not to perfectly predict future productivity. You refer management to the Product Owner for all information concerning the progress of development.


D. You inform management of organizational impediments that prevent the Scrum Team from being more productive. You enlist their help to remove these impediments.


E. You tell management that this is not your accountability in Scrum. You direct them to the Product Owner to determine whether the forecast is accurate.





A.
  You help management understand that it typically takes a few Sprints for a team to gradually increase the velocity up to the level expected. Meanwhile you present this to the team as a challenge and a company goal, leaving it however up to them to figure out exactly how to achieve this.

D.
  You inform management of organizational impediments that prevent the Scrum Team from being more productive. You enlist their help to remove these impediments.




Explanation:

A) emphasizes a gradual increase in velocity, which aligns with Scrum principles of continuous improvement and team autonomy.
D) involves addressing organizational impediments, a key role of the Scrum Master, as removing obstacles is critical to improving team performance.

Universal Containers develops a Visualforce page that requires the inclusion of external JavaScript and C55 files. They want to ensure efficient loading and caching of the page. Which feature should be utilized to achieve this goal?


A. ActionFunction


B. PageBlockTable


C. Static resources


D. RemoteAction





C.
  Static resources

A developer creates an application event that has triggered an infinite loop. What may have caused this problem?


A. The event handler calls a trigger


B. The event has multiple handlers registered in the project


C. An event is fired 'ontouchend' and is unhandled


D. The event is fired from a custom renderer





D.
  The event is fired from a custom renderer




Explanation:

In Salesforce development, firing an event from a custom renderer can sometimes cause unintended behavior, such as infinite loops. This is because custom renderers directly control the rendering lifecycle of components, and triggering events in these renderers can lead to situations where the event repeatedly fires, causing an infinite loop.

A developer created a Lightning web component that allows users to input a text value that is used to search for Accounts by calling an Apex method. The Apex method returns a list of AccountWrappers and is called imperatively from a JavaScript event handler.


Which two changes should the developer make so the Apex method functions correctly? Choose 2 answers


A. Add @AuraEnafcle3 to line 09.


B. Add @AuraEnabled to line 03.


C. Add @AuraEnabled to lines 11 and 12.


D. Add @AuraEnat:ei to line 01.





A.
  Add @AuraEnafcle3 to line 09.

C.
  Add @AuraEnabled to lines 11 and 12.


Page 2 out of 17 Pages
Previous