Salesforce Certified Platform Developer II (SU24) Questions and Answers
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?
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?
Which tag should a developer use to display different text while an
Universal Containers is using a custom Salesforce application to manage customer
support cases. The support team needs to collaborate with external partners to
resolve certain cases. However, they want to control the visibility and access to the
cases shared with the external partners. Which Salesforce feature can help achieve this requirement?
A developer creates an application event that has triggered an infinite loop.
What may have caused this problem?
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?
A business currently has a process to manually upload orders from its external Order Management System (OMS) into Salesforce.
This is a labor intensive process since accounts must be exported out of Salesforce to get the IDs. The upload file must be updated with the correct account IDs to relate
the orders to the corresponding accounts.
Which two recommendations should make this process more efficient?
Choose 2 answers
A company has a custom component that allows users to search for records of a
certain object type by invoking an Apex Controller that returns a list of results
based on the user's input. When the search is completed, a searchComplete event
is fired, with the results put in a results attribute of the event. The component is
designed to be used within other components and may appear on a single page
more than once.
What is the optimal code that should be added to fire the event when the search has completed?
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?
Universal Containers decided to use Salesforce to manage a new hire interview process. A custom object called Candidate was created with organization-wide defaults set to Private. A lookup on the Candidate object sets an employee as an Interviewer.
What should be used to automatically give Read access to the record when the lookup field is set to the Interviewer user?
A developer is asked to develop a new AppFxchange 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?
Which statement is true regarding savepoints?
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 one 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?
Which three Visualforce components can be used to initiate Ajax behavior to perform partial page updates?
Choose 3 answers
What should be added to the setup, in the location indicated, for the unit test above to create the controller extension for the test?
A)
B)
C)
A developer is responsible for formulating the deployment process for a Salesforce project. The project follows a source-driven development approach, and the developer wants to ensure efficient deployment and version control of the metadata changes.
Which tool or mechanism should be utilized for managing the source-driven deployment process?
A developer is asked to replace the standard Case creation screen with a custom screen that takes users through a wizard before creating the Case. The org only has users running Lightning Experience.
What should the developer override the Case New Action with to satisfy the requirements?
A developer writes a Lightning web component that displays a dropdown list of all custom objects in the org from which a user will select. An Apex method prepares and returns data to the component.
What should the developer do to determine which objects to include in the response?
A developer is developing a reusable Aura component that will reside on an sObject Lightning page with the following HTML snippet:
How can the component"5 controller get the context of the Lightning page that the sObject is on without requiring additional test coverage?
A company notices that their unit tests in a test class with many methods to create many records for prerequisite reference data are slow.
What can a developer to do address the issue?
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 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?
Which two queries are selective SOQL queries and can be used for a large data set of 200,000 Account records?
Choose 2 answers
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 user receives the generic "An internal server error has occurred” while interacting
with a custom Lightning component.
What should the developer do to ensure a more meaningful message?
A developer has a test class that creates test data before making a mock callout but now receives a 'You have uncommitted work pending. Please commit or rollback before calling out’ error.
Which step should be taken to resolve the error?
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?
Business rules require a Contact ta always be created when a new Account is created.
What can be used when developing a custom screen to ensure an Account is not created if the creation of the Contact fails?
A company wants to run different logic based on an Opportunity's record type.
Which code segment handles this request and follows best practices?
A)
B)
C)
D)
What is the best practice to initialize a Vizualforce page in a test class?
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?
Which use case can be performed only by using asynchronous Apex?
Recently, users notice that fields that were recently added for one department suddenly disappear without warning.
Which two statements are true regarding these issues and resolution?
Choose 2 answers
Universal Containers uses Big Objects to store almost a billion customer
transactions called customer_Transaction_ b.
These are the fields on customer Transaction b:
The following fields have been identified as Index Fields for the Customexr_Transaction__b object: Account__g, Program__c, and Transaction Date_ co.
Which SOQL query is valid on the customer_Transaction_b Big Object?
A)
B)
A developer is writing a Jest test for a Lightning web component that conditionally displays child components based on a user's checkbox selections.
What should the developer do to properly test that the correct components display and hide for each scenario?
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?
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?
An Apex trigger and Apex class increment a counter, Edit __C, any time the Case is changed.
A)
B)
C)
D)
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?
How can a developer efficiently incorporate multiple JavaScript libraries in an Aura component?
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 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 developer is building a Lightning web component that searches
for Contacts. The component must communicate the search
results to other unrelated Lightning web components, that are in
different DOM trees, when the search completes.
What should the developer do to implement the communication?
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
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 company has a native iOS order placement app that needs to connect to Salesforce to retrieve consolidated information from many different objects in a
JSON format.
Which is the optimal method to implement this in Salesforce?
A developer is asked to look into an issue where a scheduled Apex is running into DML limits. Upon investigation, the developer finds that the number of records processed by the scheduled Apex has recently increased to more than 10,000.
What should the developer do to eliminate the limit exception error?
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
Universal Containers wants to notify an external system in the event that an unhandled exception occurs when their nightly Apex batch job runs.
What is the appropriate publish/subscribe logic to meet this requirement?
In an organization that has multi-currency enabled, a developer Is tasked with building a Lighting component that displays the top ten Opportunities most recently accessed by the logged in user. The developer must ensure the Amount and LastModifiedDate field values are displayed according to the user's locale.
What is the most effective approach to ensure values displayed respect the user's locale settings?