Consider the Apex controller below, that is called from an Aura component.
What is wrong with this code?
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
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 developer wrote the following method to find all the test accounts in the org:
What should be used to fix this failing test?
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?
Given the following code:
Assuming there were 10 Contacts and five Accounts created today, what is the expected result?
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?
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?
An Aura component has a section that displays some information about an Account
and it works well on the desktop, but users have to scroll horizontally to see the description field output on their mobile devices and tablets.
How should a developer change the component to be responsive for mobile and tablet devices?
A)
B)
C)
D)
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 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
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 developer is trying to access org data from within a test class.
Which sObject type requires the test class to have the (seeAllData=true)
annotation?
A developer wrote a class named asccuntRisteryManager that relies on field history tracking. The class has a static method called getaccountHistory that Lakes in an Account as a parameter and returns a list of associated accountHistory object records.
The following test fails:
What should be done to make this test pass?
Universal Containers stores user preferences in a hierarchy custom setting,
user Prefs_c, with a checkbox field, show _help co. Company-level defaults are
stored at the organizational level, but may be overridden at the user level. If a user
has not overridden preferences, then the defaults should be used.
How should the show_Help_ c preference be retrieved for the current user?
A company needs to automatically delete sensitive information after seven years.
This could delete almost a million records every day.
How can this be achieved?
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?
Refer to the Lightning component below:
The Lightning Component allows users to click a button to save their changes and then redirects them to a different page.
Currently when the user hits the Save button, the records are getting saved, but they are not redirected.
Which three techniques can a developer use to debug the JavaScript?
Choose 3 answers
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 company's support process dictates that any time a case is closed with a status of "Could net fix," an Engineering Review custom object record should be created and populated with information from the case, the contact, and any of the products associated with the case.
What Is the correct way to automate this using an Apex trigger?
Which statement is true regarding savepoints?
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)
Which tag should a developer use to display different text while an
How should a developer assert that a trigger with an asynchronous process has successfully run?
A developer creates an application event that has triggered an infinite loop.
What may have caused this problem?
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?
What is the best practice to initialize a Vizualforce page in a test class?
Consider the queries in the options below and the following Information:
* 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.
* There are two fields that are marked as External Id on the
Account. These fields are customer_Number_c and ERR_Key_ s.
Which two queries are optimized for large data volumes?
Choose 2 answers
Universal Containers is implementing a new approval process for expense reimbursements. The process requires complex logic to determine the appropriate approver based on factors such as expense amount, employee role, and project type. The solution should allow for flexibility and future changes in the approval rules.
Which approach would be the most suitable for implementing this logic?
What is the optimal way to fix this?
A)
B)
C)
D)
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 is asked to build a solution that will automatically send an email to the customer when an Opportunity stage changes. The solution must scale to allow for 10,000 emails per day. The criteria to send the email should be evaluated after certain conditions are met.
What is the optimal way to accomplish this?
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 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?
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?
Universal Containers has an Apex trigger on Account that creates an Account Plan record when an Account is marked as a Customer.
Recently a record-triggered flow was added so that whenever an Account is marked as a Customer, a "Customer Since’ date field is updated with today's date. Since the addition of the flow, two Account Plan records are created whenever the Account is marked as a Customer.
What might cause this to happen?
Users report that a button on a custom Lightning web component (LWC) is not
saving the data they enter. The button looks to be clicked, but the LWC simply sits
there, seemingly doing nothing.
What should the developer use to ensure error messages are properly displayed?
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?
An Apex trigger and Apex class increment a counter, Edit __C, any time the Case is changed.
A)
B)
C)
D)
A developer is tasked with ensuring that email addresses entered into the system for Contacts and for a custom object called survey Response c do not belong to a list of blocked domains.
The list of blocked domains is stored in a custom object for ease of maintenance by users. The survey Response c object is populated via a custom Visualforce page.
What is the optimal way to implement this?
Universal Containers implements a private sharing model for the Convention Attendee co custom object. As part of a new quality assurance effort, the company created an Event_Reviewer_c user lookup field on the object.
Management wants the event reviewer to automatically gain ReadWrite access to
every record they are assigned to.
What is the best approach to ensure the assigned reviewer obtains Read/Write access to the record?
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?
Universal Containers analyzes a Lightning web component and its Apex controller
class that retrieves a list of contacts associated with an account. The code snippets
are as follows:
Based on the code snippets, what change should be made to display the contacts’ mailing addresses in the Lightning web component?
Universal Containers uses a custom Lightning page to provide a mechanism to perform a step-by-step wizard search for Accounts. One of the steps in the wizard is to allow the user to input text into a text field, ERF Number_c, that is then used in a query to find matching Accounts.
Which step should be taken to resolve the issue?
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?
Universal Containers develops a Salesforce application that requires frequent interaction with an external REST API.
To avoid duplicating code and improve maintainability, how should they implement the APL integration for code reuse?
A developer is creating a Lightning web component that displays a list of records in a lightning-datatable. After saving a new record to the database, the list is not updating.
What should the developer change in the code above for this to
happen?
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?
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?
How can a developer efficiently incorporate multiple JavaScript libraries in an Aura component?