Free PDII Exam Braindumps - New 2024 Salesforce Pratice Exam
Practice Test for PDII Certification Real 2024 Mock Exam
To take the PDII exam, candidates must have a solid understanding of Salesforce architecture, Apex programming, and Visualforce. They must also have experience in building custom applications and integrations in the Salesforce platform. PDII exam consists of 60 multiple-choice questions, which must be completed in 120 minutes. To pass the exam, candidates must score at least 70% or higher.
Salesforce PDII certification program is ideal for developers who have at least two years of experience in Salesforce development and have already passed the Salesforce Certified Platform Developer I (PD1) exam. The PDII certification exam tests a candidate's knowledge and expertise in areas such as Apex programming, Visualforce development, and Salesforce Lightning development. PDII exam is also designed to evaluate a candidate's proficiency in designing and implementing complex Salesforce solutions using advanced programming techniques.
NEW QUESTION # 23
After a Platform Event is defined in a Salesforce org, events can be published via which two mechanisms?
Choose 2 answers
- A. Internal Apps can use Process Builder.
- B. internal Apps can use Outbound Messages
- C. External Apps can use the standard Streaming API.
- D. External Apps require a custom Apex web service.
Answer: A,B
NEW QUESTION # 24
A company has a custom object. Request__c. that has a field, Completed__c. and a Lookup to Opportunity, Opportunity__c.
Which SOQL query will get a unique list of all of the Opportunity records that have a Completed Request?
- A.

- B.

- C.

- D.

Answer: A
NEW QUESTION # 25
This sales team needs a custom Visualforce page to enter sales orders. When a product is selected on the Visualforce page, a web service is invoked to determine if the product is in stock, and the result is displayed on the page.
How can a developer write this page to display the result of the web service and ensure governor limits for concurrent usage are not exceeded?
- A. Use Continuation that is invoked when a Submit button is clicked.
- B. Use an Apex trigger with callout=true annotation.
- C. Use the Salesforce Metadata API in the web service callout.
- D. Use visualforce Remoting to handle the web service callout.
Answer: A
NEW QUESTION # 26
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 accountInstance: Trigger.New){ if (Trigger .
isBefore){ accountInstance Exec_Count_c += 1; } System. debug
(accountInstance.Exec_Count_c); } }
- A. 1, 2, 3, 4
- B. 1, 2, 3, 3
- C. 2, 2, 3, 3
- D. 2, 2, 4, 4
Answer: D
NEW QUESTION # 27
A company manages information about their product offerings in custom objects named Catalog and Catalog Item. Catalog Item has a master-detail field to Catalog, and each Catalog may have as many as 100,000 Catalog Items.
Both custom objects have a CurrencylsoCode Text field that contains the currency code they should use. If a Catalog's CurrencylsoCode changes, all of its Catalog Items' CurrencylsoCodes should be changed as well.
What should a developer use to update the CurrencylsoCodes on the Catalog Items when the Catalog's CurrencylsoCode changes^5
- A. A Database.Schedulable and Database.Batchable class that queries the Catalog object and updates the Catalog Items if the Catalog CurrencylsoCode is different
- B. A Database.Schedulable and Database.Batchable class that queries the Catalog Item object and updates the Catalog Items if the Catalog CurrencylsoCode is different
- C. An after insert trigger on Catalog that updates the Catalog Items if the Catalog's CurrencylsoCode is different
- D. An after insert trigger on Catalog Item that updates the Catalog Items if the Catalog's CurrencylsoCode is different
Answer: A
NEW QUESTION # 28
A developer is writing a Visualforce page that queries accounts in the system and presents a data table with the results. The users want to be able to filter the results based on up to five fields. However, the users want to pick the five fields to use as filter fields when they run the page.
Which feature of Apex code is required to facilitate this solution?
- A. SOSL queries
- B. Dynamic Schema binding
- C. describeSObjects()
- D. REST API
Answer: C
NEW QUESTION # 29
An org contains two custom objects; Building__c and Office__c. Office__c has a Lookup field to Building__c.
A developer is asked to automatically populate the Number_of_Offices__c field on the Building__c object with the count of related Office__c
records anytime an Office__c record s created or deleted. The developer cannot modify the field types.
Which solution meets the requirements?
- A. Apex Trigger
- B. Process Builder
- C. Workflow
- D. Flow
Answer: A
NEW QUESTION # 30
Which annotation exposes an Apex class as a RESTful neb service?
- A. @RemoteAction
- B. @RestRtsoorct
- C. @HttpInvocabte
- D. @AuraEnaWed
Answer: B
NEW QUESTION # 31
When the sales team views an individual customer record, they need to see recent interactions for the customer. These interactions can be sales orders, phone calls, or Cases. The date range for recent interactions will be different for every customer record type.
How can this be accomplished?
- A. Use a dynamic form on the customer record page to display recent interactions.
- B. Use a Lightning component to query and display interactions based on record type that is passed in using a design:attribute from the Lightning page.
- C. Use batch Apex to query for the most recent interactions when the customer view screen is loaded.
- D. Use Lightning Flow to read the customer's record type, and then do a dynamic query for recent interactions and display on the View page.
Answer: B
Explanation:
The best way to accomplish this requirement is to use a Lightning component to query and display interactions based on record type that is passed in using a design:attribute from the Lightning page. A Lightning component is a reusable unit of an app that can include markup, JavaScript, CSS, and Apex. A Lightning component can use the Lightning Data Service or Apex to query data from Salesforce and display it on a Lightning page. A design:attribute is a way to define attributes for a Lightning component that can be set in Lightning App Builder or Experience Builder. By using a Lightning component, the developer can create a custom UI element that can query and display the recent interactions for the customer based on the record type that is passed in as a design:attribute from the Lightning page. This way, the developer can leverage the Lightning framework and the Lightning Data Service or Apex to create a dynamic and interactive component that meets the requirement. Reference: [Lightning Components Basics], [Lightning Data Service Basics], [Design Attributes in Aura Components], [Design Attributes in Lightning Web Components]
NEW QUESTION # 32
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?
- A. There will be no error, since each trigger fires within its own context and each trigger does not exceed the limit of the number of records processed by DML| statements.
- B. The mass update will fail, since the two triggers fire in the same context, thus exceeding the number of records processed by DML statements.
- C. There will be no error, since the limit on the number of records processed by DML statements is 50,000.
- D. The mass update of Account address will succeed, but the Contact address updates will fail due to exceeding number of records processed by DML statements.
Answer: A
NEW QUESTION # 33
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. The test will fail.
- B. There will be five accounts where the name starts with "Test".
- C. There will be no accounts where the name starts with "Test".
- D. There will be six accounts where the name starts with "Test".
Answer: B
Explanation:
Based on the test method code, the statement that is true after the test code runs is that there will be five accounts where the name starts with "Test". This is because the test method is running in API version 24.0 or later, which means that it can't access pre-existing org data by default, and can only access data that it creates. Therefore, the first query that retrieves the accounts where the name starts with "Test" will return an empty list, as there are no such accounts in the test context. The test method then inserts a new account with the name "Test1", which will be the only account that the test method can access. The second query that retrieves the accounts where the name starts with "Test" will return a list with one account, which is the account that was just inserted. The test method then asserts that the size of the list is equal to 1, which will pass. The test will not fail, as there is no assertion error or exception. There will not be no accounts where the name starts with "Test", as there is one account that was inserted by the test method. There will not be six accounts where the name starts with "Test", as the test method can't access the five accounts that exist in the org data. Reference: [Isolation of Test Data from Organization Data in Unit Tests], [Understanding Test Data]
NEW QUESTION # 34
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?
- A. Store the information in a List Custom Setting and query it with SOQL.
- B. Store the information in Custom Metadata and access it with the getAll() method.
- C. Store the information in Custom Metadata and query it with SOQL.
- D. Store the information in a list Custom Setting and access it with the getAll() method
Answer: A
NEW QUESTION # 35
A company uses Salesforce to sell products to customers. They also have an external product information management (PIM) system that is the system of record for products.
A developer received these requirements:
* Whenever a product is created or updated in the PIM, a product must be created or updated as a Product? record in Salesforce and a PricebookEntry record must be created or updated automatically by Salesforce.
= The PricebookEntry should be created in a Priceboek2 that is specified in a custom setting.
What should the developer use to satisfy these requirements?
- A. Event Monitoring
- B. Invocable Action
- C. SObject Tree REST
- D. Custom Apex REST
Answer: D
Explanation:
Custom Apex REST is a way of creating custom RESTful web services using Apex code. Custom Apex REST can be used to expose Salesforce data and functionality to external systems, such as the product information management (PIM) system. By using custom Apex REST, the developer can create a custom endpoint that can accept requests from the PIM system, and perform the required operations on the Product2 and PricebookEntry objects in Salesforce. Custom Apex REST can also use the custom setting to determine the Pricebook2 to use for creating or updating the PricebookEntry records. Custom Apex REST can also handle authentication, authorization, and error handling for the web service. Reference: [Custom Apex REST Web Services], [Create a Custom REST API Endpoint]
NEW QUESTION # 36
Universal Containers wants to notify an external system, in the event that an unhandled exception occurs, by publishing a custom event using Apex.
What is the appropriate publish/subscribe logic to meet this requirement?
- A. Publish the error event using the Eventrus.publish() method and have the external system subscribe to the event using CometD.
- B. Publish the error event using the addError () method and write a trigger to subscribe to the event and notify the external system.
- C. Publish the error event using the addError () method and have the external system subscribe to the event using CometD.
- D. Have the external system subscribe to the event channel. No publishing is necessary.
Answer: A
Explanation:
The appropriate publish/subscribe logic to meet this requirement is to publish the error event using the EventBus.publish() method and have the external system subscribe to the event using CometD. The EventBus.publish() method allows the developer to publish a custom event using Apex, and specify the event type, payload, and channel. The external system can use CometD, which is a scalable HTTP-based event routing bus, to subscribe to the event channel and receive the event notifications. The addError() method is not a valid answer, as it is used to display a custom error message on a record or a field, but it does not publish an event. The without keyword is not a valid answer, as it is used to ignore the sharing rules and permissions of the current user when accessing the records, but it does not affect the event publishing or subscribing. The event channel is not a valid answer, as it is the name of the channel that the event is published to or subscribed from, but it does not initiate the publish/subscribe logic by itself. Reference: [Publish and Subscribe to Platform Events Using Apex], [Subscribe to Platform Events Using CometD], [Apex Developer Guide]
NEW QUESTION # 37
Which annotation should a developer use on an Apex method to make it available to be wired to a property In a Lightning web component?
- A. @RemoteAction
- B. @AuraEnabledcacheable=true)
- C. @QRemoteAction(caccheable=true)
- D. @AuraEnabled
Answer: B
NEW QUESTION # 38
A developer is inserting, updating, and deleting multiple lists of records in a single transaction and wants to ensure that any error prevents all execution.
How should the developer implement error exception handling in their code to handle this?
- A. Use Database methods to obtain lists of Database.SaveResults.
- B. Use a try-catch and use sObject.addError() on any failures.
- C. Use Database.setSavepoint {} and Database.rollBack with a try-catch statement.
- D. Use a try-catch statement and handle DML cleanup in the catch statement,
Answer: C
Explanation:
The best way to implement error exception handling in their code to handle this requirement is to use Database.setSavepoint() and Database.rollback() with a try-catch statement. Database.setSavepoint() is a method that creates a savepoint, which is a point in the request that specifies the state of the database at that time. Database.rollback() is a method that rolls back the database to the state that was saved at a specified savepoint. A try-catch statement is a way to handle exceptions, which are errors that occur during the execution of the code. By using Database.setSavepoint() and Database.rollback() with a try-catch statement, the developer can create a savepoint before inserting, updating, or deleting the lists of records, and then roll back to the savepoint if any error occurs. This way, the developer can ensure that any error prevents all execution and preserves the database integrity . Reference: [Savepoints and Transactions], [Database.setSavepoint Method], [Database.rollback Method], [Exception Handling]
NEW QUESTION # 39
External Id fields
- A. Configure a custom field as Salesforce ID.
- B. Configure a custom field as external ID.
- C. Configure a custom field as unique.
- D. Configure a custom field as indexed.
Answer: B,C
NEW QUESTION # 40
A custom Aura component, AddressValidation,cmp,exists in the system. The Salesforce admin for the organization is unable to find and select the component while creating a quick action for the Account sObject.
What should the developer do to ensure that AddressValidation,cmp can be selected when creating a quick action?
- A. Ensure the component implements the lightning:actionOverride interface.
- B. Ensure the component implements the force:lighningQuickAction.interface.
- C. Ensure the component implements the force:hasRecordedId interface.
- D. Ensure the access attribute of the aura:component tag is st t Global.
Answer: B
NEW QUESTION # 41
A customer has a single Visualforce page that allows each user to input up to 1500 sales forecasts and instantly view pivoted forecast calculations. Users are complaining that the page is loading slowly, and they are seeing error messages regarding heap and view state limits. What are three recommendations to optimize page performance?
- A. Create formula fields to compute pivoted forecast calculations.
- B. Segregate calculation functionality from input functionality.
- C. Use JavaScript Remoting instead of controller actions.
- D. Specify the list of sales forecasts as transient.
- E. Implement pagination and reduce records per page.
Answer: A,C,E
NEW QUESTION # 42
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. All of the three Save methods will be executed
- D. Save from CaseExtensionTwo will be executed
Answer: A
NEW QUESTION # 43
A company uses Dpportunities to track sales to their customers and their org has millions of Opportunities. They want to begin to track revenue over time through a related Revenue object.
As part of their initial implementation, they want to perform a one-time seeding of their data by automatically creating and populating Revenue records for Opportunities, based on complex logic.
They estimate that roughly 100,000 Opportunities will have Revenue records created and populated.
What is the optimal way to automate this?
- A. Use Database. executeBatch () to invoke a Queueable class.
- B. Use Database. =executeBatch() to invoke a Database. Batchable class.
- C. Use system, enqueuJob (| to invoke a gueusable class.
- D. Use system, acheduladeb() to schedule a patakape.Scheduleable class.
Answer: B
NEW QUESTION # 44
A developer created an Opportunity trigger that updates the account rating when an associated opportunity is considered high value. Current criteria for an opportunity to be considered high value is an amount greater than or equal to SI,000,000. However, this criteria value can change over time.
There is a new requirement to also display high value opportunities In a Lightning web component.
Which two actions should the developer take to prevent the business logic that obtains the high value opportunities from being repeated in more than one place?
Choose 2 answers
- A. Use custom metadata to hold the high value amount.
- B. Leave the business logic code Inside the trigger for efficiency.
- C. Create a helper class that fetches the high value opportunities.
- D. Call the trigger from the Lightning web component.
Answer: A,C
NEW QUESTION # 45
......
Prepare For Realistic PDII Dumps PDF - 100% Passing Guarantee: https://www.vcetorrent.com/PDII-valid-vce-torrent.html
Check the Available PDII Exam Dumps with 169 QA's: https://drive.google.com/open?id=19PDMwnld7zxGGckYMfSLXKjnZhAWktmI