Salesforce Certified Platform Developer II (SU24)
Last Update Dec 14, 2024
Total Questions : 193
We are offering FREE PDII Salesforce exam questions. All you do is to just go and sign up. Give your details, prepare PDII free exam questions and then go for complete pool of Salesforce Certified Platform Developer II (SU24) test questions that will help you more.
Universal Containers wants to use a Customer Community with Customer Community Plus licenses to allow their customers access to track how many containers they have rented and when they are due back. Universal Containers uses a Private sharing model for External users, Many of their customers are multi-national corporations with complex Account hierarchies. Each account on the hierarchy represents a department within the same business,
One of the requirements is to allow certain community users within the same
Account hierarchy to see several departments’ containers, based on a custom
junction object that relates the Contact to the various Account records that
represent the departments.
Which solution solves these requirements?
Which technique can run custom logic when a Lightning web component is loaded?
Universal Containers allows customers to log into a Salesforce Community and update their orders via a custom Visualforce page. Universal Containers’ sales representatives can edit the orders on the same Visualforce page.
What should a developer use in an Apex test class to test that record sharing is enforced on the Visualforce page?
Which statement is considered a best practice for writing bulk safe Apex triggers?
Refer to the test method below''
The test method calls a web service that updates an external system with Account
information and sets the Accounts integration_Updated__c checkbox to True when it completes.
The test fails to execute and exits with an error: "Methods defined as TestMethod do
not support Web service callouts.”
A)
B)
C)
D)
A company has an Apex process that makes multiple extensive database operations and web service callouts. The database processes and web services can take a long time to run and must be run sequentially.
How should the developer write this Apex code without running into governor limits and system limitations?
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?
Consider the following code snippet:
How should the component that an order has been selected by the user?
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?
A Visuzlforce page loads slowly due to the large amount of data it displays.
Which strategy can a developer use to improve the performance?
A developer wrote a trigger on Opportunity that will update a custom Last Sold Date
field on the Opportunity's Account whenever an Opportunity is closed. In the test
class for the trigger, the assertion to validate the Last Sold Date field fails.
What might be causing the failed assertion?
A developer needs to store variables to control the style and behavior of a Lightning Web Component.
Which feature can be used to ensure that the variables are testable in both Production and all Sandboxes?
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 developer created a JavaScript library that simplifies the development of repetitive tasks and features and uploaded the library as a static resource called rsutils in Salesforce. Another developer is coding a new Lightning web component (LWC) and wants to leverage the library,
Which statement properly loads the static resource within the LWC?
Universal Containers is leading a development team that follows the source-driven development approach in Salesforce. As part of their continuous integration and delivery (CL/CD) process, they need to automatically deploy changes to multiple environments, including sandbox and production.
‘Which mechanism or tool would best support their CI/CD pipeline in source-driven development?
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 software company uses a custom object, Defact__c, to track defects in their
software. Defect__c has organization-wide defaults set to private. Each Defect_ c
has a related list of Reviewer < records, each with a lookup field to User that is
used to indicate that the User will review the defect__c.
What should be used to give the User on the Reviewer_c record read only access
to the Defect__c record on the Reviewer_c record?
As part of point-to-point integration, a developer must call an external web service which, due to high demand, takes a long time to provide a response. As part of the request, the developer must collect key Inputs from the end user before making the callout. Which two elements should the developer use to Implement these business requirements?
Choose 2 answers
A company has many different unit test methods that create Account records as
part of their data setup. A new required field was added to the Account and now all
of the unit tests fail.
What is the optimal way for a developer to fix the issue?
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?
Which Salesforce feature allows a developer to see when a user last logged in to
Salesforce if real-time notification is not required?
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 resolve the callout exception?
An org has a requirement that an Account must always have one and only one Contact listed as Primary. So selecting one Contact will de-select any others. The client wants a checkbox on the Contact called 'Is Primary’ to control this feature.
The client also wants to ensure that the last name of every Contact is stored entirely in uppercase characters.
What is the optimal way to implement these requirements?
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?
Refer to the following code snippets:
A developer is experiencing issues with a Lightning web component. The component must surface information about Opportunities owned by the currently logged-in user.
When the component is rendered, the following message is displayed: "Error retrieving data”.
Which modification should be implemented to the Apex class to overcome the issue?
A developer is creating a page in App Builder that will be used in the Salesforce mobile app.
Which two practices should the developer follow to ensure the page operates with optimal performance?
Choose 2 answers
Consider the Apex class below that defines a RemoteAction used on 2 Visualforce search page.
Which code snippet will assert that the remote action returned the correct Account?
A)
B)
C)
D)
How should a developer verify that a specific Account record is being tested in a test
class for a Visualforce controller?
The Salesforce admin et 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.
Which code segment is the most efficient way to fulfill this request?
A)
B)
C)
D)
A developer is writing code that requires making callouts to an external web service.
Which scenario necessitates that the callout be made in an asynchronous method?
A developer has a Visualforce page that automatically assigns ewnership of an Account to a queue upon save. The page appears to correctly assign ownership, but an assertion validating the correct ownership fails.
What can cause this problem?
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?
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?
Refer to the test method below:
The test method 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 company wants to incorporate a third-party weh service to set the Address fields
when an Account is inserted, if they have not already been set.
What is the optimal way to achieve this?
Universal Charities (UC) uses Salesforce to collect electronic donations in the form of credit card deductions from individuals and corporations.
When a customer service agent enters the credit card information, it must be sent
to 8 3rd-party payment processor for the donation to be processed, UC uses one
payment processor for individuals and a different one for corporations.
What should a developer use to store the payment processor settings for the
different payment processors, so that their system administrator can modify the
settings once they are deployed, if needed?
A Visualforce page needs to make a callout to get billing information and tax information from two different REST endpoints. The information needs to be
displayed to the user at the same time and the return value of the billing information contains the input for the tax information callout. Each endpoint might take up to two minutes to process.
How should a developer implement the callouts?
A company has code to update a Request and Request Lines and make a callout to
their external ERP system's REST endpoint with the updated records.
The callousUtil.makeRestCallout fails with a "You have uncommitted work pending. Please commit or rollback before calling cut’ error.
What should be done to address the problem?
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?
When developing a Lightning web component, which setting displays lightninglayout-items im one column on small devices, such as mobile phones, and in two
columns on tablet-size and desktop-size screens?
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?
Consider the controller code below that is called from an Aura component and
returns data wrapped in a class.
The developer verified that the queries return a single record each and there is error handling in the Aura component, but the component is not getting anything back when calling the controller getSemeData.
‘What is wrong?
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
Universal Containers (LIC) wants to develop a customer community to help their customers log issues with their containers. The community needs to function for their German- and Spanish-speaking customers also. UC heard that it's easy to create an international community using Salesforce, and hired a developer to build out the site.
What should the developer use to ensure the site is multilingual?
How can a developer efficiently incorporate multiple JavaScript libraries in an Aura component?
A company has a custom object, Order__c, that has a custom picklist field, Status__c, with values of ‘New,' 'In Progress,’ or ‘Fulfilled’ and a lookup field,
Contact__c, to Contact.
Which SOQL query will return a unique list of all the Contact records that have no ‘Fulfilled’ Orders?
A)
B)
C)
D)
Given a list of Opportunity records named opportunityList, which code snippet is best for querying all Contacts of the Opportunity's Account?
A)
B)
C)
D)