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
To make an Apex method callable from a Lightning Web Component, you need to annotate the method with @AuraEnabled and mark it as cacheable if it's only retrieving data without modifying it. Additionally, the method must be public to be accessible from the component.
Line 04: Needs @AuraEnabled(cacheable=true) to allow the method to be called from the Lightning Web Component and indicate that the method doesn't modify any data, making it suitable for caching.
Line 09: The method getFiveMostRecent should not be private because private methods cannot be called from a Lightning Web Component. Changing it to public (or default, which is equivalent to public within the same namespace) is required.
Lightning Web Components and Salesforce Data: Developer Documentation
@AuraEnabled Annotation: Apex Developer Guide
A developer has a requirement to query three fields (Id, Name, Type) from an Account; and first and last names for all Contacts associated with the Account.
Which option is the preferred, optimized method to achieve this for the Account named 'Ozone Electronics'?
A)
B)
D)
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?
By implementing force:hasSobjectName, the Aura component can retrieve the sObject context of the record page it is placed on without needing additional information. This interface provides the component with the API name of the sObject being displayed.
Aura Components Developer Guide
A developer needs to send Account records to an external system for backup purposes. The process must take a snapshot of Accounts as they are saved and then make a callout to a RESTful web service. The web service can only receive, at most, one record per call.
What should a developer do to implement these requirements?
A developer is building a complex commission calculation engine in Apex that is called from an Opportunity trigger. During QA it was reported that the calculations are incorrect.
The developer has representative test data and passing test methods in their developer sandbox.
Which three tools or techniques could the developer use to execute the code and pause it at key lines to visually inspect values of various Apex variables?
Choose 3 answers
To debug and troubleshoot the commission calculation engine, a developer can use several tools provided by Salesforce to inspect and pause the execution of Apex code.
Apex Interactive Debugger: It allows real-time debugging of Apex code execution. With this tool, a developer can set breakpoints, step through code, inspect variables, and evaluate expressions.
Developer Console: Although the Developer Console does not allow interactive debugging, it does provide the ability to view logs that capture the execution of code. Debug logs can be inspected to understand the flow of execution and values of variables at different points in time.
Apex Replay Debugger: This tool is part of Salesforce Extensions for Visual Studio Code. It allows a developer to replay a debug log as if they are stepping through the code line by line, which can be very useful to inspect the state of variables at specific points in the execution.
Apex Interactive Debugger
Developer Console Debugging
Apex Replay Debugger
Marva
5 days agoUlysses
2 months agoFarrah
3 months agoKiley
4 months agoCassi
5 months agoSkye
5 months agoKatlyn
6 months agoErick
6 months agoCarol
7 months agoMadelyn
7 months agoLaticia
7 months agoRory
7 months agoFrank
8 months agoPaul
8 months agoClorinda
8 months agoJackie
8 months agoLynelle
9 months agoAllene
9 months agoDominic
9 months agoKallie
9 months agoRonnie
9 months agoVal
10 months agoLeslie
10 months agoFelice
11 months agoIdella
11 months agoIsadora
12 months agoAngelica
12 months agoReena
1 years ago