Salesforce Certified Platform Developer II (WI24)
Last Update 1 day ago
Total Questions : 196
PDII is stable now with all latest exam questions are added 1 day ago. Just download our Full package and start your journey with Salesforce Certified Platform Developer II (WI24) certification. All these Salesforce PDII practice exam questions are real and verified by our Experts in the related industry fields.
A Salesforce org has more than 50,000 contacts. A new business process requires a calculation that aggregates data from all of these contact records. This calculation needs to run once a day after business hours.
Which two steps should a developer take to accomplish this?
Choose 2 answers
There are user complaints about slow render times of a custom data table within a Visualforce page that loads thousands of Account records at once. What can a developer do to help alleviate such issues?
Which scenario requires a developer to use an Apex callout instead of Outbound Messaging?
Universal Containers (UC) currently does not development in its full copy sandbox.
Recently, UC has projects that require multiple developers to develop concurrently. UC is running into issues with developers making changes that cause errors In work done by other developers.
Additionally, when they are ready to deploy, many unit tests fail which prevents the deployment.
which three types of orgs should be recommended to UC to eliminate these problems?
Choose 3 answers
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?
Consider the following code snippet:
Users of this Visualforce page complain that the page does a full refresh every time the Search button is pressed.
What should the developer do to ensure that a partial refresh is made so that only the section identified with opportunity List Is re-drawn on the screen?
A developer wrote the following method to find all the test accounts in the org:
What should be used to fix this falling test?
Consider the following queries. For these queries, assume that there are more than 200,000 Account records. These records include soft-deleted records; that is, deleted records that are still in the Recycle Bin. Note that there are two fields that are marked as External Id on the Account. These fields are Customer_Number__c and ERP_Key__c.
Which two queries are optimized for large data volumes? Choose 2 answers
A developer is writing a Jest for a Lightning web component that conditionally displays child components based on a user’s checkbox selections.
What should the developer do to property test that the correct components display and hide for each scenario?
Universal Containers decided to use Salesforce to manage a new hire interview process. A custom object called candidate as created with organization-wide default set to Private. A lookup on the Candidate object sets an employee as an the viewer user
Exhibit.
A developer created a JavaScript function as a part of a Lightning web component (LWC) that surfaces information… about leads by imperatively calling getFetchLeadList when certain criteria are met.
What are these changes the developer should implement in the Apex class above to ensure the LWC can display data efficiently while preserving security?
Choose 3 answers
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 ail the test data that is needed to perform the tests.
What should the developer do to speed up test execution?
Universal Containers (UC) has an CRP system that stores customer information.
When an Account is created in Salesforce, the FRP system's REST endpoint for creating new customers must automatically be called with the Account information, If the call to the ERP system fails, the Account should still be created. Accounts in UC org are only created, one at a time, by users in the customer on-boarding department.
What should a developer to make the call to the CRP system's REST endpoint7
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 developer created a Lightning web component that uses a lightning-record-edit-form t collect information about Leads. Users complain that they only see one error message at a time about their input when trying to save a Lead record.
complain that they only see one error message at a time about their input when trying to save a Lead record.
What is the recommended approach to perform validations on more than one field, and display multiple error messages simultaneously?
with minimal JavaScript intervention?
A developer is building a Lightning web component that retrieves data from Salesforce and assigns it to the record property.
What must be done in the component to get the data from Salesforce?
A)
B)
C)
D)
A Visualforce page contains an industry select list and displays a table of Accounts that have a matching value in their Industry field.
When a user changes the value in the industry select list, the table of Accounts should be automatically updated to show the Accounts associated with the selected industry.
What is the optimal way to implement this?
An org has a Process Builder process on Opportunity that sets a custom field,CommissionBaseAmount__c, when an Opportunity is edited and the Opportunity's Amount changes.
A developer recently deployed an Opportunity before update trigger that uses the CommissionBaseAmount__c and complex logic to calculate a value for a custom field CommissionAmount_c, when an Opportunity stage changes to Closed/Won.
Users report that when they change the Opportunity to Closed/Won and also change the Amount during the same save, the C:rr.i;5icn
A.
T.cur.t c is incorrect.Which two actions should the developer take to correct this problem? Choose 2 answers
A developer is creating a lightning web component to display a calendar. The component will be used in multiple countries. In some locales, the first day of the week is a Monday, or a Saturday, or a Sunday.
What should the developer do to ensure the calendar displays accurately for users in every locale?
A developer used custom settings to store some configuration data that changes occasionally. However, tests are now failing in some of the sandboxes that were recently refreshed.
What should be done to eliminate this issue going forward?
How should a developer reference a third-party JavaScript library from a Lightning component?
A Page throws an Attempt to dereference a null object error for a Contact. What change In the controller will fix the error?
Consider the following code snippet:
As part of the deployment cycle, a developer creates the following test class:
When the test class runs, the assertion fails.
Which charge should the developer implement in the Apex test method to ensure the test method execute successfully?
Consider the following code snippet:
Which two steps should the developer take to add flexibility to change the endpolnt and credentials without needing to modify code?
Choose 2 answers
Universal containers needs to integrate with several external systems. The process is initiated when a record is created in Salesforce. The remote systems do not require Salesforce to wait for a response before continuing.
What is the recommended best solution to accomplish this?
A developer created and tested a Visualforce page in their developer sandbox, but now receives reports that users are encountering ViewState errors when using it in Production. What should the developer ensure to correct these errors?
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) 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 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?
Users upload .csv files in an external system to create account and contact records in Salesforce. Up to 200 records can be created at a time. The users need to wait for a response from Salesforce in the external system, but the data does not need to synchronize between the two systems.
Based on these requirements, which method should a developer use to create the records in Salesforce?
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 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 developer created an Apex class that updates an Account based on input from a Lightning web component that is used to register an Account. The update to the Account should only be made if it has not already been registered.
What should the developer do to ensure that users do not overwrite each other’s updates to the same Account if they make updates at the same time?
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?
The following code segment is railed from a Trigger handler class from the Opportunity trigger:
Which two changes should improve this code and make it more efficient? Choose 2 answers
A developer needs to store variables to control the style and behavior of a Lightning Web Component. Which feature should be used to ensure that the variables are testable in both Production and all Sandboxes?
A company uses Salesforce to sell products to customers. They also have an external product information management (P1M) system that If 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 Product2 record in Salesforce and a PricebookEntry record must be created or updated automatically by Salesforce.
• The PricebookEntry should be created in a Pricebooki that is specified in a custom setting.
What should the developer use to satisfy these requirements?
A company recently deployed a Visualforce page with a custom controller that has a data grid of information about Opportunities in the org.
Users report that they receive a ''Maximum view state size limit'' error message under certain conditions.
According to Visualforce best practice, which three actions should the developer take to reduce the view state? Choose 3 answers
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
Consider the following code snippet:
A developer created the following test class to provide the proper code coverage for the snippet above:
However, when the test runs, no data is returned and the assertion fails.
However, when the test runs, no data is returned and the assertion fails.
Which edit should the developer make to ensure the test class runs successfully?
Universal Containers needs to integrate with a Heroku service that resizes product images submitted by users.
What are two alternatives to implement the integration and protect against malicious calls to Heroku app's endpoint? Choose 2 answers
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
Consider the above trigger intended to assign the Account to the manager of the Account''s region. Which two changes should a developer make in this trigger to adhere to best practices? Choose 2 answers
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 belong to.
Object Name:
Fields:
Cloud Kicks wants a trigger on the Lead to populate the Region based on the Lead's zip code. Which code segment is the most efficient way to fulfill this request?
A)
B)
C)
A company accepts orders for customers in their enterprise resource planning (ERP) crder__c records with a lookup field to Account. The Account object has an External ID field, ERP_Customer_ID__c.
What should the integration use to create new Order__c records that will automatically be related to the correct Account?
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 developer is building a Lightning web component that displays quantity, unit price, and the total for an order line item. The total is calculated dynamically as the quantity multiplied by the unit price.
What must be added to display the total?
A developer created a class that implement he 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
Consider the following code snippet:
Which governor limit is likely to be exceeded when the trigger runs when a scope of 200 newly inserted accounts?
A developer is asked to create a Lightning web component that will be invoked via button on a record page. The component must be displayed in a model dialog.
Which three steps should the developer take to achieve this?
Choose 3 answers
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?
Universal Containers requested the addition of a third-party Map widget to an existing Lightning web component.
Which two actions should the developer take to implement this requirement?
Choose 2 answers