As part of a custom interface, a developer team creates various new Lightning web components. Each of the components handles errors using toast messages. When the development is complete, all the components are added to the same Lightning page.
During acceptance testing, users complain about the long chain of toast messages that display when errors occur loading the components.
Which two techniques should the developer implement to improve the user experience?
Choose 2 answers
The scenario describes a common issue when multiple components are used on the same Lightning page and each component manages its error handling independently, leading to a 'long chain of toast messages' which can be overwhelming for users.
To improve user experience, the developers can implement the following techniques:
A . Use a Lightning web component to aggregate and display all errors: This method involves creating a centralized component responsible for handling all error messages. This component would receive error notifications from other components and then display them in a user-friendly manner. The benefit of this approach is that it provides a single, consistent interface for error messages, reducing the clutter and confusion that can be caused by multiple toasts.
D . Use public properties on each component to display the error messages: By using public properties, components can expose their error states to a parent or orchestrating component, which can then display these errors in a single, consolidated way. This avoids the issue of multiple toast notifications and allows for a more integrated error handling experience.
The other options presented are less ideal:
B . Using the window.alert() method is not recommended in a professional Salesforce environment as it is considered a disruptive way to show errors and does not align with the Salesforce Lightning design system.
C . Using a <template> tag to display in-place error messages could be a viable option for displaying error messages within the component itself, but it does not address the issue of multiple errors stacking up from different components as described in the scenario.
For building a centralized error handling component: Lightning Web Components Developer Guide - Error Handling
For implementing public properties: Lightning Web Components Developer Guide - Public Properties
A developer wrote an Apex class to make several callouts to an external system.
If the URLs used in these callouts will change often, which feature should the developer use to minimize changes needed to the Apex class?
The correct feature to use is C, Named Credentials. Named Credentials are a secure way of storing the endpoint and authentication details for callouts to external services. When URLs change frequently, using Named Credentials allows you to manage the endpoint URL in one place without changing the Apex code.
Named Credentials
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
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.
B.
C.
D.
A Lightning web component exists in the system and displays information about the record in context as a medal. Salesforce administrators need to use this component
within the Lightning App Builder,
Which two settings should the developer configure within the xml resource file?
Choose 2 answers
Cassi
12 days agoSkye
19 days agoKatlyn
1 months agoErick
2 months agoCarol
2 months agoMadelyn
2 months agoLaticia
3 months agoRory
3 months agoFrank
3 months agoPaul
3 months agoClorinda
4 months agoJackie
4 months agoLynelle
4 months agoAllene
4 months agoDominic
4 months agoKallie
5 months agoRonnie
5 months agoVal
5 months agoLeslie
6 months agoFelice
7 months agoIdella
7 months agoIsadora
7 months agoAngelica
8 months agoReena
8 months ago