2024 Lead2Passed Salesforce PDII Dumps and Exam Test Engine
Salesforce PDII DUMPS WITH REAL EXAM QUESTIONS
NEW QUESTION # 80
A developer created the code to perform an HTP GET request to an external system.
When the code is executed, the callout is unsuccessful and the following error appears within the Developer Console:System.CalloutException: Unauthorized endpoint Which recommended approach should the developer implement to the callout exception?
- A. Change the access modifier for ERPCatelog from Public to global
- B. use the setHeader () method to specify Basic Authentication.
- C. Annotate the getERPCatalogContents method With @Future (Callout-true)
- D. create a remote site setting configuration that includes the endpoint.
Answer: A
NEW QUESTION # 81
A company has a Lightning Page with many Lightning Components, some that cache reference data. It is reported that the page does not always show the most current reference data. What can a developer use to analyze and diagnose the problem in the Lightning Page?
- A. Salesforce Lightning Inspector Actions Tab
- B. Salesforce Lightning Inspector Transactions Tab
- C. Salesforce Lightning Inspector Storage Tab
- D. Salesforce Lightning Inspector Event Log Tab
Answer: C
NEW QUESTION # 82
A developer created 2 class that implements the Queueable Interface, as follows:
As part of the deployment process, the developer is asked to create a corresponding test class.
Which two actions should the developer take to successfully execute the test class?
Choose 2 answers
- A. Ensure the running user of the test class has, at I the View All permission on the Order object.
- B. Implement Test. isRunningTest() to prevent chaining jobs during test execution.
- C. Implement seeAllData=True to ensure the Queueable job is able to run in bulk mode.
- D. Enclose System.enqueueJob(new OrderQueueableJob ()] within Tess. and Test .stopTest (1.
Answer: A,D
NEW QUESTION # 83
A developer has refactored an application and renamed an Apex class in a sandbox and now needs to deploy the changes to production. How can this be accomplished? Choose 2 answers
- A. Use the Force.com IDE to delete the old Apex class from the project and deploy the changes to production.
- B. Deploy the new Apex class with the Force.com Migration Tool and set the old name in destructiveChanges.xml.
- C. Use a changeset to both delete the old Apex class and deploy the new Apex class to production.
- D. Deploy the new Apex class, and then log in to the production environment and manually delete the class.
Answer: A,B
NEW QUESTION # 84
Universal Containers (UC) has an ERP system that stores customer Information, When an Account is created in Salesforce, the ERP system's REST endpoint for creating new customers must automatically be called with the Account information. If the call to the ERP system falls, the Account should still be created. Accounts in the UC org are only created, one at a time, by users in the UC customer on-boarding department.
What should a developer implement to make the call to the ERP
system's REST endpoint?
- A. REST call from JavaScript
- B. Call a Queueable from a Trigger
- C. Headless Quick Action
- D. Apex Continuation
Answer: A
NEW QUESTION # 85
Which of the following exceptions cannot be caught and will force an error? (Choose three.)
- A. DMLException
- B. ListException
- C. LimitException
- D. SObjectExceptions
- E. AssertException
- F. License exceptions
Answer: C,E,F
Explanation:
Reference:
SObjectException occurs when accessing a field not queried, or you try to change a field during the
wrong dml statement (i.e. an edit-only field being set on insert)
Custom exceptions must extend the "Exception" class
NEW QUESTION # 86
A developer wants to use an Aura component with a custom action.
What should be considered in order to do this?
- A. The class "slds-modal_ _container" must be added to the top-level element of the component
- B. The component must implement the flexipage:availableForRecordHome interface
- C. A default value must be provided for each component attribute marked as required
- D. The component's JavaScript controller must handle a method on initialization
Answer: B
Explanation:
Explanation/Reference:
NEW QUESTION # 87
How would you test a web service?
- A. Create a class that implements the WebServiceMock interface
- B. Web Services do not need to be tested
- C. Call the WebService interface
- D. Use the @future annotation on the method
Answer: A
NEW QUESTION # 88
The head of recruiting at Universal Containers wants to provide all internal users the ability to search for open positions by role, department, and location via a new recruiting app, In addition to search, users of the app should be able to refer a fried, apply for a position, and review the status of their current submissions. The app should be made available in Salesforce Mobile, but offline access is not required.
Given these requirements, what is the recommended approach to developer the app?
- A. Salesforce SDK
- B. Lightning Web Components
- C. Visualforce
- D. Lightning Experience Builder
Answer: A
NEW QUESTION # 89
Given the following information regarding Universal Containers (UC):
* UC represents their customers as Accounts in Salesforce.
* All customers have a unique Customer__Number_c that is unique across all of UC's systems.
* UC also has a custom Invoice c object, with a Lookup to Account, to represent invoices that are sent out from their external system.
UC wants to integrate invoice data back into Salesforce so Sales Reps can see when a customer pays their bills on time.
What is the optimal way to implement this?
- A. Create a cross-reference table in the custom invoicing system with the Salesforce Account ID of each Customer and insert invoice data nightly,
- B. Ensure Customer Number cis an External ID and that a custom field Invoice Number cis an External ID and Upsert invoice data nightly.
- C. Use Salesforce Connect and external data objects to seamlessly import the invoice data into Salesforce without custom code.
- D. Query the Account Object upon each call to insert invoice data to fetch the Salesforce ID corresponding to the Customer Number on the invoice.
Answer: A
Explanation:
The optimal way to implement the requirement is to create a cross-reference table in the custom invoicing system with the Salesforce Account ID of each Customer and insert invoice data nightly. This way, the developer can use the Salesforce Account ID as the foreign key to associate the invoice data with the correct Account record in Salesforce, and avoid querying the Account object for each invoice record. This can improve the performance and reliability of the data integration, as it reduces the number of queries and the dependency on the Customer Number field. Ensuring Customer Number is an External ID and that a custom field Invoice Number is an External ID and upsert invoice data nightly would not be optimal, as it would still require querying the Account object for each invoice record to match the Customer Number field. Using Salesforce Connect and external data objects to seamlessly import the invoice data into Salesforce without custom code would not be optimal, as it would require the external system to expose the invoice data as an OData service, and also incur additional costs for using Salesforce Connect. Querying the Account Object upon each call to insert invoice data to fetch the Salesforce ID corresponding to the Customer Number on the invoice would not be optimal, as it would be inefficient and prone to errors, especially if the Customer Number field is not unique or indexed. Reference: [Salesforce Connect: Data Integration Platform], [External ID Field]
NEW QUESTION # 90
Which object should be used to access sharing programmatically on an object named Equipment__c?
- A. Equipment_c_share
- B. Equipment__Share
- C. Equipment_Share_c
- D. Equipment-c
Answer: B
NEW QUESTION # 91
A business requires that every parent record must have a child record. A developer writes an Apex method with two DML statements to insert a parent record and a child record.
A validation rule blocks child records from being created. The method uses a try/catch block to handle the DML exception.
What should the developer do to ensure the parent always has a child record?
- A. Delete the parent record in the catch statement when an error occurs on the child record DML operation.
- B. Set a database savepoint to rollback if there are errors.
- C. Use Database.insert () and set the allorNone parameter to true.
- D. Use addError () on the parent record if an error occurs on the child record.
Answer: B
NEW QUESTION # 92
Salesforce users consistently receive a "Maximum trigger depth exceeded" error when saving an Account. How can a developer fix this error?
- A. Split the trigger logic into two separate triggers.
- B. Convert the trigger to use the 3suzure annotation, and chain any subsequent trigger invocations to the Account object.
- C. Use a helper class to set a Boolean to TRUE the first time a trigger 1s fired, and then modify the trigger ta only fire when the Boolean is FALSE.
- D. Modify the trigger to use the L=MultiThread=true annotation,
Answer: C
Explanation:
A "Maximum trigger depth exceeded" error occurs when a trigger invokes itself recursively, either directly or indirectly, and exceeds the maximum stack depth. To fix this error, you can use a helper class to set a Boolean flag to TRUE the first time a trigger is fired, and then modify the trigger to only fire when the Boolean flag is FALSE. This way, you can prevent the trigger from running more than once for the same record. Splitting the trigger logic into two separate triggers does not solve the problem, as the triggers may still invoke each other recursively. Converting the trigger to use the @future annotation does not guarantee that the error will not occur, as the future method may still invoke the trigger again. The @MultiThread=true annotation does not exist in Apex. Reference: [Trigger Frameworks and Apex Trigger Best Practices], [@future Annotation]
NEW QUESTION # 93
What is the optimal syntax for adding a link to a case in a Visualforce page? Choose 2 answers
- A. < apex:outputLink value="{!viewCase(case.Id)}" target="_blank"> [] {lcase.Name} <
/apex:outputLink> - B. < apex:outputLink value="/{!case.Id}" target="_blank"> [] {lcase.Name} < /apex:outputLink>
- C. < apex:outputLink value="{!URLFOR($Action.Case.Open, case)}" target="_blank"> [] {lcase.Name} <
/apex:outputLink> - D. < apex:outputLink value="{!URLFOR($Action.Case.View,case.Id)}" target="_blank"> (LIE
{!case.Name} < /apex:outputLink>
Answer: B,D
NEW QUESTION # 94
A developer has a page with two extensions overriding the Standard controller for Case.
What will happen when a user clicks the command button?
- A. Save from CaseExtensionOne will be executed
- B. Save from Case Standard Controller will be executed
- C. Save from CaseExtensionTwo will be executed
- D. All of the three Save methods will be executed
Answer: A
NEW QUESTION # 95
Choose the correct definition for <apex:actionStatus>.
- A. Adds AJAX support to another component (e.g. onClick, onMouseUp, onFocus, etc.)
- B. Can be associated with an AJAX request (actionFunction/actionSupport/actionPoller) and shows content conditionally depending on the status of the request (in progress/complete). Use the "id" field to specify name; use "status" field on related components to connect them
- C. Allows for controller methods to be called directly from Javascript. Must be encapsulated in <apex:form> tags. Unlike actionSupport, these function<apex:actionPoller>s can be called directly from Javascript code
- D. Signifies which components should be processed by the server when an AJAX request is generated
- E. Sends an AJAX request according to the time interval you specify. If this ever gets re-rendered, it resets
Answer: B
NEW QUESTION # 96
A developer is tasked with creating a Lightning web component that is responsive on various devices, Which two components should help accomplish this goal?
Choose 2 answers
- A. lightning-navigation
- B. lightning-layout--item
- C. Lightning-input-location
- D. Lightning-layout
Answer: B,D
Explanation:
The two components that should help accomplish the goal of creating a Lightning web component that is responsive on various devices are lightning-layout and lightning-layout-item. These components allow the developer to create flexible and responsive layouts that can adapt to different screen sizes and orientations. The lightning-layout component creates a horizontal or vertical container that can hold one or more lightning-layout-item components. The lightning-layout-item component represents a single item in the layout, and can have attributes such as size, padding, alignment, and order, that control how the item is rendered in the layout. The lightning-navigation component is not a valid answer, as it is used to navigate to a given page reference or to generate a URL from a page reference, but it does not affect the responsiveness of the component. The lightning-input-location component is not a valid answer, as it is used to display and edit the address fields of a location, but it does not affect the responsiveness of the component. Reference: [Lightning Layout], [Lightning Web Components Developer Guide]
NEW QUESTION # 97
What should a developer use to query all Account fields for the Acme account in their sandbox?
- A. SELECT FIELDS (ALL) FROM Account WHERE Name = 'Acme' LIMIT 1
- B. SELECT FROM ACCOUNT WHERE Name = 'Acme' LIMIT 1
- C. SELECT ALL FROM Account WHERE Name = 'Acme' LIMIT 1
- D. SELECT FIELDS FROM Account WHERE Name = 'Acme' LIMIT 1
Answer: A
NEW QUESTION # 98 
Refer to the code segment above.
When following best prachces for writing Apex triggers, which two lines are wrong or cause for concern?
Choose 2 answers
- A. Line 11
- B. Line 16
- C. Line 20
- D. Lines 6
Answer: C,D
NEW QUESTION # 99
A developer has created the following trigger: trigger ProcessDoNotCall on Contact (after update) { List<Contact> lstCon = [SELECT Id, DoNotCall, Department FROM Contact WHERE Department = 'HR' AND Id IN :Trigger.new]; for(Contact c : lstCon) c.DoNotCall= true; update lstCon; } The developer executes the following code anonymously in the Developer Console. Assume that the record exists in Salesforce.
Contact con = new Contact(Id='003oOOOOOOVHXOm',Department = 'HR') update con; Which behavior will the developer observe?
- A. The code will throw an exception, saying that the record cannot be updated in an After Update trigger.
- B. The code will throw an exception because the maximum trigger depth has been exceeded.
- C. The contact record will be saved and the contact record's DoNotCall field will be set to true.
- D. The code will throw an exception in Anonymous Apex, indicating that the Id field is read-only.
Answer: B
NEW QUESTION # 100
A developer created a Lightning web component for the Account record page that displays the five most recently contacted Contacts for an Account. The Apex method, Contacts, returns a list of Contacts and will be wired to a property in the component.
Which two lines must change in the above code to make the Apex method able to be wired?
Choose 2 answers
- A. Add public to line 04.
- B. Add @AuraEnabled {cacheable=trues) to line 08.
- C. Add @AuraEnabled {cacheable=true) to line 03.
- D. Remove private from line 09.
Answer: A,C
Explanation:
To make the Apex method able to be wired, the developer should change two lines in the code: add public to line 04, and add @AuraEnabled(cacheable=true) to line 03. Adding public to line 04 makes the Apex method accessible from outside the class, which is required for the @wire decorator to invoke the method. Adding @AuraEnabled(cacheable=true) to line 03 makes the Apex method cacheable, which means that the method can be invoked by a Lightning web component that uses the @wire decorator. This also improves the performance of the component, as it reduces the number of server trips and leverages the client-side cache. The developer should use this annotation for methods that return data that does not change frequently or does not depend on the user context. Adding @AuraEnabled(cacheable=true) to line 08 is not necessary, as the cacheable attribute only applies to the top-level method that is invoked by the @wire decorator, not to the helper methods that are called within the class. Removing private from line 09 is not necessary, as the helper method can be private as long as it is called from within the class. Reference: [Call Apex Methods from Lightning Web Components], [Marking Methods as Storable or Cacheable]
NEW QUESTION # 101
Which of the following about Dynamic Apex is incorrect?
- A. Schema.getGlobalDescribeQ gives you a map of all sObject
- B. getDescribe() can get you a variety of info on a particular object/field
- C. You can retrieve the sObject type from an Id by calling .getSObjectTypeQ
- D. In dynamic SOQL, you can use bind variables and bind variable fields
Answer: D
Explanation:
Explanation
Explanation/Reference:
Explanation:
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 # 102
In which of the following scenarios would it be acceptable to use programmatic sharing instead of declarative sharing? (Choose three.)
- A. Every record created by sales users needs to be visible to their respective manager
- B. There is an existing, external system of truth for user access assignments which will continue to drive access and be integrated with salesforce
- C. Poor performance when using native sharing components
- D. You need to change record access to read/write for all users utilising a lightning component
- E. Team functionality is required on custom objects
Answer: B,C,E
NEW QUESTION # 103
A developer created the following test method:
The developer org has five accounts where the name starts with Test". The developer executes this test in the Developer Console.
After the test code runs, which statement is true?
- A. There will be five accounts where the name starts with Test"
- B. There will be six accounts where the name starts with Test".
- C. There will be no accounts where the name starts with "Test".
- D. The test will fail.
Answer: A
NEW QUESTION # 104
......
The PDII exam consists of 60 multiple-choice questions and lasts for 120 minutes. To pass the exam, a candidate must achieve a score of 63% or higher. PDII exam can be taken online or in person at a testing center. Preparation for the exam includes studying the official Salesforce PDII exam guide, participating in developer training courses, and gaining hands-on experience with the Salesforce Platform. Earning the PDII certification not only validates a developer's skills, but it also opens up new career opportunities and demonstrates a commitment to professional development in the Salesforce ecosystem.
2024 New Lead2Passed PDII PDF Recently Updated Questions: https://www.lead2passed.com/Salesforce/PDII-practice-exam-dumps.html
PDII Exam with Guarantee Updated 169 Questions: https://drive.google.com/open?id=1BEUIXiScKvRNobfiE2fqUYOcu5SPCPnt