mafalda2.2
|
|
Título del Test:
![]() mafalda2.2 Descripción: developer 2 |



| Comentarios |
|---|
NO HAY REGISTROS |
|
Choose 1 option. Which use case can be performed only by using asynchronous Apex?. Querying tens of thousands of records. Making a call to schedule a batch process to complete in the future. Calling a web service from an Apex trigger. Updating a record after the completion of an insert. Choose 1 option. Which interface needs to be implemented by an Aura component so that it may be displayed in modal dialog by clicking a button on a Lightning record page?. lightning:editAction. lightning:quickAction. force:lightningEditAction. force:lightningQuickAction. Choose 1 option. Refer to the component code and requirements below: <lightning:layout multipleRows="true"> <lightning:layoutItem size="12">{!v.account.Name} </lightning:layoutItem> <lightning:layoutItem size="12">{!v.account.AccountNumber} </lightning:layoutItem> <lightning:layoutItem size="12">{!v.account.Industry} </lightning:layoutItem> </lightning:layout> Requirements: 1. For mobile devices, the information should display in three rows. 2. For desktops and tablets, the information should display in a single row. Requirement 2 is not displaying as desired. Which option has the correct component code to meet the requirements for desktops and tablets?. <lightning: layout multipleRows="true"> <lightning:layoutItem size="12" mediumDeviceSize="6">{!v.account.Name} </lighting:layoutItem> <lightning: layoutItem size="12" mediumDeviceSize="6">{!v.account.AccountNumber) </lighting:layoutItem> <lightning:layoutItem size="12" mediumDeviceSize="6">{!v.account. Industry) </lighting: layoutItem> </lightning:layout>. <lightning: layout multipleRows="true"></lightning:layout>. <lightning: layout multipleRows="true"> <lightning:layoutItem size="12" largeDeviceSize="4">{!v.account.Name} </lighting:layoutItem> <lightning: layoutItem size="12" large DeviceSize="4">{!v.account.Account Number} </lighting:layoutItem> <lightning:layoutItem size="12" large DeviceSize="4">{!v.account.Industry) </lighting:layoutItem> </lightning: layout>. <lightning: layout multipleRows="true"> <lightning: layoutItem size="12" mediumDeviceSize="6" large DeviceSize="4"> {!v.account.Name) </lighting: layoutItem> <lightning: layoutItem size="12" mediumDeviceSize="6" large DeviceSize="4"> {!v.account.AccountNumber} </lighting:layoutItem> <lightning:layoutItem size="12" mediumDeviceSize="6" large DeviceSize="4"> {!v.account. Industry) </lighting: layoutItem> </lightning: layout>. Choose 1 option. Consider the following code snippet: html <c-selected-order> <template for:each={orders.data} for:item="order"> <c-order orderId={order.Id}></c-order> </template> </c-selected-order> How should the <c-order> component communicate to the <c-selected- order> component that an order has been selected by the user?. Create and dispatch a custom event. Create and fire a component event. Create and fire an application event. Create and fire a standard DOM event. Choose 1 option. A developer created a Lightning web component that uses a lightning-record-edit- form to collect information about Leads. Users complain that they only see one error message at a time about their input when trying to save a Lead record. Which best practice should the developer use to perform the validations on more than one field, thus allowing more than one error message to be displayed simultaneously?. Apex REST. Client-side validation. Next Best Action. Custom validation rules. Choose 1 option. Refer to the Aura component below: Component markup: html <aura:component> <aura:attribute name="contactInfo" type="Object"/> <aura:attribute name="showContactInfo" type="boolean" default="true"/> <aura:handler name="init" value="{!this}" action="{!c.init}"/> <!-- ... other code ... --> <aura:if isTrue="{!v.showContactInfo}"> <c:contactInfo value="{!v.contactInfo}"/> </aura:if> </aura:component> Controller JS: { init: function(cmp, helper) { // ...other code ... var show = helper.getShowContactInfo(); cmp.set("v.showContactInfo", show); }, // other code... } A developer receives complaints that the component loads slowly. Which change can the developer implement to make the component perform faster?. Move the contents of <c:contactInfo> into the component. Change the type of contactInfo to "Map". Change the default for showContactInfo to "false". Choose 1 option. Which technique can run custom logic when a Lightning web component is loaded?. Use an <aura:handler> init event to call a function. Use the connectedCallback() method. Use the renderedCallback() method. Call $A.enqueueAction and pass in the method to call. Choose 1 option. Which Salesforce feature allows a developer to see when a user last logged in to Salesforce if real-time notification is not required?. Asynchronous Data Capture Events. Calendar Events. Event Monitoring Log. Developer Log. Choose 3 options. Refer to the Lightning component below: html <lightning:button label="Save" onclick="{!c.handleSave}" /> { handleSave : function (component, event, helper) { helper.saveAndRedirect(component); } } 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?. Use the browser's dev tools to debug the JavaScript. Use Developer Console to view the debug log. Use console.log() messages in the JavaScript. Use Developer Console to view checkpoints. Enable Debug Mode for Lightning components for the user. Choose 1 option. A company wants to run different logic based on an Opportunity's record type. Which code segment handles this request and follows best practices?. (Option A - querying RecordType in loop). (Option B - using RecordType.Name directly in trigger). (Option C - query with map but null checks). (Option D - using Schema.SObjectType.Opportunity.getRecordTypeInfosByName()). Choose 1 option. The Account object has a field, Audit_Code__c, that is used to specify what type of auditing the Account needs and a Lookup to User, Auditor__c, that is the assigned auditor. When an Account is initially created, the user specifies the Audit_Code__c. Each User in the org has a unique text field, Audit_Code__c, that is used to automatically assign the correct user to the Account's Auditor__c field. Trigger: trigger AccountTrigger on Account (before insert) { AuditAssigner.setAuditor(Trigger.new); } public class AuditAssigner { public static void setAuditor(List<Account> accounts) { for (User u : [SELECT Id, Audit_Code__c FROM User]) { for (Account a : accounts) { if (u.Audit_Code__c == a.Audit_Code__c) { a.Auditor__c = u.Id; } } } } } What should be changed to most optimize the code's efficiency?. Add a WHERE clause to the SOQL query to filter on audit codes. Build a Map<String, List<Account>> of audit code to accounts. Build a Map<Id, List<String>> of Account Id to audit codes. Add an initial SOQL query to get all distinct audit codes. |




