PD-2 Set 3 - Jeev

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

1. 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. <Lightning: layout multipleRows = "false"> <Lighting: layoutItem size "6"> {!v.rec.Name} </Lightning: layout Item> <Lighting: layoutItem size "6"> {!v.rec.Description_c} </Lightning: layout Item> </Lightning: layout> A. <Lightning: layout multipleRows = "true"> <Lighting: layoutItem size "12" largeDeviceSize= "6"> {!v.rec.Name} </Lightning: layout Item> <Lighting: layoutItem size "12" largeDeviceSize= "6"> {!v.rec.Description_c} </Lightning: layout Item> </Lightning: layout> B. <Lightning: layout multipleRows = "false"> <Lighting: layoutItem size "12" largeDeviceSize= "6"> {!v.rec.Name} </Lightning: layout Item> <Lighting: layoutItem size "12" largeDeviceSize= "6"> {!v.rec.Description_c} </Lightning: layout Item> </Lightning: layout>

A. <Lightning: layout multipleRows = "true"> <Lighting: layoutItem size "12" largeDeviceSize= "6"> {!v.rec.Name} </Lightning: layout Item> <Lighting: layoutItem size "12" largeDeviceSize= "6"> {!v.rec.Description_c} </Lightning: layout Item> </Lightning: layout>

1. 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. <Lightning: layout multipleRows = "false"> <Lighting: layoutItem size "6"> {!v.rec.Name} </Lightning: layout Item> <Lighting: layoutItem size "6"> {!v.rec.Description_c} </Lightning: layout Item> </Lightning: layout> A. <Lightning: layout multipleRows = "true"> <Lighting: layoutItem size "12" largeDeviceSize= "6"> {!v.rec.Name} </Lightning: layout Item> <Lighting: layoutItem size "12" largeDeviceSize= "6"> {!v.rec.Description_c} </Lightning: layout Item> </Lightning: layout> B. <Lightning: layout multipleRows = "false"> <Lighting: layoutItem size "12" largeDeviceSize= "6"> {!v.rec.Name} </Lightning: layout Item> <Lighting: layoutItem size "12" largeDeviceSize= "6"> {!v.rec.Description_c} </Lightning: layout Item> </Lightning: layout> C. <Lightning: layout multipleRows = "false"> <Lighting: layoutItem size "12" largeDeviceSize= "6"> {!v.rec.Name} </Lightning: layout Item> <Lighting: layoutItem size "12" largeDeviceSize= "6"> {!v.rec.Description_c} </Lightnin

A. <Lightning: layout multipleRows = "true"> <Lighting: layoutItem size "12" largeDeviceSize= "6"> {!v.rec.Name} </Lightning: layout Item> <Lighting: layoutItem size "12" largeDeviceSize= "6"> {!v.rec.Description_c} </Lightning: layout Item> </Lightning: layout>

1. Refer to the component video and requirements below: <Lightning: layout multipleRows = "true"> <Lighting: layoutItem size "12"> {!v account.Name} </Lightning: layout Item> <Lighting: layoutItem size "12"> {!v account.AccountNumber} </Lightning: layout Item> <Lighting: layoutItem size "12"> {!v account.Industry} </Lightning: layout Item> </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?

A. <Lightning: layout multipleRows = "true"> <Lighting: layoutItem size "12" mediumDeviceSize= "4"> {!v account.Name} </Lightning: layout Item> <Lighting: layoutItem size "12" mediumDeviceSize= "4"> {!v account.AccountNumber} </Lightning: layout Item> <Lighting: layoutItem size "12" mediumDeviceSize= "4"> {!v account.Industry} </Lightning: layout Item> </Lightning: layout>

1. A large company uses Salesforce across several departments. Each department has its own Salesforce Administrator. It was agreed that each Administrator would have their own in which to test changes. 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 A. A sandbox should be created to use as a unified testing environment instead of deploying Change Sets directly to production. B. The administrators are deploying their own Change Sets over each other, thus replacing entire Page Layouts in production. C. Page Layouts should never be deployed via Change Sets, as this causes Field-Level Security to be reset and fields to disappear. D. The administrators are deploying their own Change Sets, thus deleting each other's fields from the objects in production.

A. A sandbox should be created to use as a unified testing environment instead of deploying Change Sets directly to production. B. The administrators are deploying their own Change Sets over each other, thus replacing entire Page Layouts in production.

A large company uses Salesforce across several departments. Each department has its own Salesforce administrator. It was agreed that each administrator would have their own sandbox in which to test changes. Recently users notice that fileds that were recently added for one department suddenly disappear without warning. Which two statements are true regarding these issues and resolution? Choose 2 answers A. A sandbox should be created to use as a unified testing environment instead of deploying change sets directly to production. B. The administrator are deploying their own change sets, thus deleting each other's fields from the objects in production. C. The administrator are deploying their own change sets over each other, thus replacing entire page layout in production. D. Page layout should never be deployed via change sets at this causes Field - level security to be reset and fields to be disappear.

A. A sandbox should be created to use as a unified testing environment instead of deploying change sets directly to production. C. The administrator are deploying their own change sets over each other, thus replacing entire page layout in production.

1. A developer gets an error saying 'Maximum Trigger Depth Exceeded'. What is a possible reason to get this error message? A. A trigger is recursively invoked more than 16 times B. A flow trigger was included too many times. C. There are numerous DML operations in the trigger logic. D. The SOQL governor limits are being hit

A. A trigger is recursively invoked more than 16 times

1. Consider the Apex class below that defines a RemoteAction used on a Visualforce search page. Global with sharing class Myremoter { Public String accountName (get; set;) public static Account account ( get; set; } public Myremoter() () @Remoteaction Global static Account getAccount (String accountName) { Account = (SELECT Id, Name, NumberofEmployees FROM Account WHERE Name = ;accountName]; Return account; } } Which code snippet will assert that the remote action returned the correct Account? A. Account a= MyRemoter.getAccount (TestAccount'); System.assertEquals ('TestAccount', a.Name ); B. Account a = controller.getAccount ("TestAccount'); System.assertEquals( 'TestAccount', a.Name ); C. MyRemoter remote new MyRemoter(); Account a remote.getAccount ("TestAccount'); System.assertEquals TestAccount', a.Name); D. MyRemoter remote new MyRemoter ("TestAccount'); Account a remote.getAccount();

A. Account a= MyRemoter.getAccount (TestAccount'); System.assertEquals ('TestAccount', a.Name );

1. Refer to the test method below Line1 : @is Test Line 2: static void testMyTrigger() Line 3: { Line 4: //Do a bunch of data set-up Line 5: Datafactory.setupDataForMyTriggerTest(); Line 6: Line 7: list <Account> accts before = { [SELECT Is Customer FROM Account WHERE Id IN DataFactory.accounts); Line 8: Line 9: //utility to assert all accounts are not customers before the update Line 10: Assert Util.assertNotCustomers (accteBefore); Line 11: Line 12: //Set accounts to be customers Line 13: for (Account a : DataFactory.accounts) Line 14: { Line 15: a.Is Customer_c = true; Line 16: } Line 17: Line 18:. Update DataFactory.accounts; Line 19: Line 20: List<Account> acctsAfter = (SELECT Number Of Transfers FROM Account WHERE I IN DataFactory.accounts]; Line 21: Line 22: //Utility to assert Number of Transfers is correct based on test data Line 23: AssertUtil.assertNumberOfTransfers (acctsAfter); Line 24:. } 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. Add Test.startText(

A. Add Test.startText() before and add Test.atoptest() after Line 18 of the code.

1. A developer created a Lightning web component for the Account record page that displays the five most recently contacted Contacts Account. The Apex method, getRecentContacte, returns a list of Contacts and will be wired to a property in the component. 01: 02: public class ContactFetcher ! 03: 04: static List<Contact> getRecentContacts (Id accountId) { 05: List<Contact> contacts getFiveMost Recent (accountId): 06: return contacts; 07:. } 08: 09: private static List<Contact> getFiveMostRecent (Id accountId) ( 10: //...implementation... Which two lines must change in the above code to make the Apex method able to be wired? Choose 2 answers A. Add public to line 04. B. Add @AuraEnabled(cacheable=true) to line 03. C. Remove private from line 09 D. Add @AuraEnabled(cacheable=true) to line 08.

A. Add public to line 04. B. Add @AuraEnabled(cacheable=true) to line 03.

1. A developer created a Lightning web component for the Account record page that displays the five most recently contacted Contacts Account. The Apex method, getRecentContacte, returns a list of Contacts and will be wired to a property in the component. 01: 02: public class ContactFetcher ! 03: 04: static List<Contact> getRecentContacts (Id accountId) { 05: List<Contact> contacts getFiveMost Recent (accountId): 06: return contacts; 07:. } 08: 09: private static List<Contact> getFiveMostRecent (Id accountId) ( 10: //...implementation... Which two lines must change in the above code to make the Apex method able to be wired? Choose 2 answers A. Add public to line 04. B. Remove private from line 09 C. Add @AuraEnabled(cacheable=true) to line 08. D. Add @AuraEnabled(cacheable=true) to line 03.

A. Add public to line 04. D. Add @AuraEnabled(cacheable=true) to line 03.

1. Refer to the following code snippet: Public class LeadController ( . Public static List<Lead> get FetchLeadList (String searchTerm, Decimal aRevenue) String safeTerm '4'-searchTerm.escapeSingleQuote()-' return { SELECT Name, Company, Annual Revenue FROM Lead WHERE Annual Revenue > :aRevenue AND Company LIKE :safeTerm; LIMIT 20 }; } A developer created a JavaScript function as part of a Lightning web component (LWC) that surfaces information about Leads by wire calling getfetchtleadlist when certain criteria are met. Which three changes should the developer implement in the Apex class above to ensure the LWC can display data efficiently while preserving security? A. Annotate the Apex method with 9AuraEnabled(Cacheable=true). B. Implement the with sharing keyword in the class declaration. Use the WITH SECURITY ENFORCED clause within the SOQL query. C. Implement the without sharing keyword in the class declaration. D. Annotate the Apex method with @AuraEnabled.

A. Annotate the Apex method with 9AuraEnabled(Cacheable=true). B. Implement the with sharing keyword in the class declaration. Use the WITH SECURITY ENFORCED clause within the SOQL query. C. Implement the without sharing keyword in the class declaration.

1. Universal Containers implements a private sharing model for the convention Attendee e custom object. As part of a new quality assurance effort, the company crested an Event Reviewer user lockup field on the object. Management wants the event reviewer to automatically gain Read/Write 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? A. Create an after insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing B. . Create criteria-based sharing rules on the Convention Attendee custom object to share the records with the Event Reviewers. C. Create a criteria-based sharing rule on the Convention Attendee custom object to share the records with a group of Event Reviewers. D. Create a before insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.

A. Create an after insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing

1. Consider the following code snippet: <c-selected-order> <template for each (orders.datal for:item"order"> <c-order orderId= (order.Id)></e-order> </template> </c-selected-order> How should the co-order> component communicate to the ce-selected-order> component that an order has been selected by the user? A. Create and dispatch a custom event B. Create and fire a standard DOM event. C. Create and fire a component event. D. Create and fire an application event.

A. Create and dispatch a custom event

1. A developer is asked to develop a new AppExchange 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 practices setting that apply to most customers. What should the developer use to store and package the custom configuration settings for the app? A. Custom metadata B. Custom settings C. Custom objects D. Custom labels

A. Custom metadata

1. A developer is asked to find a way to store secret data with an ability to specify which profiles and users can access which secrets. What should be used to store this data? A. Custom settings B. Custom metadata C. Syazen.Cookie class D. Static resources

A. Custom settings

76. After a platform event is defined in a Salesforce org, events can be published via which mechanism? A. External Apps use an API to publish event messages. B. Internal Apps can use entitlement processes. C. External Apps require the standard Streaming API. D. Internal Apps can use outbound messages.

A. External Apps use an API to publish event messages.

1. A developer is tasked with ensuring that email addresses entered into the system for Contacts and for a custom object called Survey Response 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 object is populated via a custom Visualforce page. What is the optimal way to implement this? A. Implement the logic in a helper class that is called by an Apex trigger on Contact and from the custom Visualforce page controller B. Implement the logic in validation rules on the Contact and the Survey Response, objects. C. Implement the logic in an Apex trigger on Contact and also implement the logic within the custom Visualforce page controller D. Implement the logic in the custom Visualforce page controller and call that method from an Apex trigger on Contact

A. Implement the logic in a helper class that is called by an Apex trigger on Contact and from the custom Visualforce page controller

1. Line 1 trigger ContactTrigger on Contact (before insert, before update) Line 2 { Line 3 Map <ld, Account) accountMap = new Map<I'd, Account>(); Line 4. For{contact c: Trigger.new} Line 5. { Line 6. Account a = {SELECT I'd, Name, Billing country FROM Account WHERE I'd := c.AccountId}: Line 7. Accountmap.puy{a,I'd,a}; Line 8. } Line 9 Line 10. // Do stuff with accountMap Line 11. For {contact c; trigger,new} Line 12. { Line 13. Account a= account Map.get (c.AccountId); Line 14. If(a. != null) Line 15. { Line 16. C.BillingCountry = a.BillingCountry; Line 17. } Line 18. } Line 19 Line 20. Update Trigge.new; Line 21. } Refer to the code segment above. When following best practices for writing Apex triggers, which two lines are wrong or cause for concern? Choose 2 answers A. Line 6 B. Line 11 C. Line 16 D. Line 20

A. Line 6 D. Line 20

1. A developer is writing a Listener for implementing outbound messaging. Which three considerations must the developer keep in mind in this case? A. Messages can be delivered out of order. B. Messages are retried independent of their order in the queue. C. The sessionid in an outbound message is scoped for both API requests and UI requests. D. The Organization ID is included only in the first outbound message. E. The Listener must be reachable from the public Internet.

A. Messages can be delivered out of order. B. Messages are retried independent of their order in the queue. C. The sessionid in an outbound message is scoped for both API requests and UI requests.

1. The following code segment is called from a trigger handler class from the Opportunity trigger: For (Opportunity opp: trigger.new) { If (opp. Amount>1000000){ Account acct = {SELECT I'd, status From Account where I'd= :opp.accountId Limit 1}; Acct.status = 'Higj potential'; Update act; } } Which two changes will improve this code and make it more efficient? Choose 2 answers A. Move the DML outside of the far loop. B. Move the business logic inside the Opportunity trigger. C. Use Trigger.old instead of Trigger.new. D. Move the SOQL to fetch the account record outside of the fez loop.

A. Move the DML outside of the far loop. C. Use Trigger.old instead of Trigger.new.

1. A company represents their customers as Accounts that have an External ID field called Customer umber_c. They have a custom object, order, with a Lookup to Account, to represent Orders that are placed in their external order management system (OMS). When an order is fulfilled in the OMS, a REST call to Salesforce should be made that creates an Order record in Salesforce and relates it to the proper Account. What is the optimal way to implement this? A. Perform a REST PATCH to upsert the order and specify the Account's customer_ Number_c in it B. Perform a REST GET on the Account and a REST POST to update the order_c with the Account's record ID. C. Perform a REST POST to update the order and specify the Account's Customer_humber_c in it. D. Perform a REST GET on the Account and a REST PATCH to upsert the order_c with the Account's record ID.

A. Perform a REST PATCH to upsert the order and specify the Account's customer_ Number_c in it

1. A company recently deployed a Visualforce page with a custom controller that has a data grid of information about opportunities in the org. Users report that they receive a "Maximum view state size limit error message under certain conditions According to Visualforce best practice, which three actions should the developer take to reduce the view state? Choose 3 answers A. Refine any SOQL queries to return only data relevant to the page. B. Use the private keyword in the controller for variables. C. Use the final keyword in the controller for variables that will not change. D. Use the transient keyword in the Apex controller for variables that do not maintain state. E. Use filters and pagination to reduce the amount of data.

A. Refine any SOQL queries to return only data relevant to the page. D. Use the transient keyword in the Apex controller for variables that do not maintain state. E. Use filters and pagination to reduce the amount of data.

1. Consider the following code snippet: Trigger OpportunityTrigger on Opportunity (before insert, before update) for (Opportunity opp: Trigger.new){ OpportunityHandler.setPricingstructure (opp) } } Public class OpportunityHandler{ Public static void setPricingStructure (Opportunity thisopp) ( Pricing Structure_c pe [Select Type_c FROM Pricing_Structure_c WHERE industry_c= this Opp.Account Industry_c}; This opp.fricing_structure_c.= pa.type_c; Update thisopp; } } Which two best practices should the developer implement to optimize this code? A. Remove the DML statement B. Query the Pricing Structure_c records outside of the loop. C. Change the trigger context to after update, after insert D. .Use a collection for the DML statement.

A. Remove the DML statement B. Query the Pricing Structure_c records outside of the loop.

1. Consider the following code snippet: Trigger OpportunityTrigger on Opportunity (before insert, before update) For (Opportunity opp: Trigger.new){ OpportunityHandler.setPricingstructure (opp) } } Public class OpportunityHandler{ Public static void setPricingStructure (Opportunity thisopp) ( Pricing Structure_c pe [Select Type_c FROM Pricing_Structure_c WHERE industry_c= This Opp.Account Industry_c}; This opp.fricing_structure_c.= pa.type_c; Update thisopp; } } Which two best practices should the developer implement to optimize this code? A. Remove the DML statement B. Use a collection for the DML statement. C. Query the Pricing Structure_c records outside of the loop. D. Change the trigger context to after update, after insert E. Use a collection for the DML statement.

A. Remove the DML statement C. Query the Pricing Structure_c records outside of the loop.

1. A developer used custom settings to store some configuration cats that changes occasionsly. However, tests are now falling in some of the sans that were recently refreshed What should be done to eliminate this issue going forward? A. Replace custom settings with custom metadata B. Replace custom settings with static resources C. Set the setting type on the custom setting to Hierarchy D. Set the setting type on the custom setting to List

A. Replace custom settings with custom metadata

1. What should a developer use to query all Account fields for the Acme account in their sandbox? A. SELECT FIELDS (ALL) FROM Account HERE Name - Acme' LIMIT1 B. SELECT ALL FROM Account HERE Name - Rome' LIMIT 1 C. SELECT FROM Account HERE Name - Acme LIMIT 2 D. SELECT FIELOS FROM Account HERE Name 'Acre' LIMIT 1

A. SELECT FIELDS (ALL) FROM Account HERE Name - Acme' LIMIT1

1. 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. SELECT Id FROM Account WHERE Name IN (List of Names) AND Customer Number_c = "ValueA" B. SELECT Id FROM Account WHERE Id IN (List of Account Ids) C. SELECT Id FROM Account WHERE Name != ' ' D. SELECT Id FROM Account WHERE Name LIKE 'Partner'

A. SELECT Id FROM Account WHERE Name IN (List of Names) AND Customer Number_c = "ValueA" B. SELECT Id FROM Account WHERE Id IN (List of Account Ids)

1. What are three reasons that a developer should write Jest tests for Lightning web components? Choose 3 answers A. To verify the DOM output of a component B. To verify that events fire when expected C. To test how multiple components work together D. To test basic user interaction E. To test a component's non-public properties

A. To verify the DOM output of a component B. To verify that events fire when expected D. To test basic user interaction

1. A company uses Opportunities to track sales to their customers and their org has millions of Opportunities. They want to begin to track revenue over time through a related Revenue object. As part of their initial implementation, they want to perform a one-time seeding of their data by automatically creating and populating Revenue records for Opportunities, based on complex logic. They estimate that roughly 100,000 Opportunities will have Revenue records created and populated What is the optimal way to automate this? A. Use Databare.executebatch to invoke a Database.Batchable class. B. Use System. Scheduletab ti to schedule a Database. Scheduleable class. C. Use Database.executebatabil to invoke a Queusable class. D. Use System.enqueuece to Invoke a Queueable class.

A. Use Databare.executebatch to invoke a Database.Batchable class.

1. A page throws an 'Attempt to dereference a null object' error for a Contact. What change in the controller will fix the error? A. Use a condition in the getter to return a new Contact if it is null B. Change the setter's signature to return a Contact. C. Change the getter's signature to be static Contact. D. Declare a static final Contact at the top of the controller.

A. Use a condition in the getter to return a new Contact if it is null

1. Salesforce users consistently receive a "Maximum trigger depth exceeded" error when saving an Account. How can a developer fix this error? A. Use a helper class to set a Boolean to TRUE the first time a trigger is fired, and then modify the trigger to only fire when the Boolean is FALSE. B. Split the trigger logic into two separate triggers. C. Convert the trigger to use the @future annotation, and chain any subsequent trigger invocations to the Account object. D. Modify the trigger to use the Molts Thread=true annotation.

A. Use a helper class to set a Boolean to TRUE the first time a trigger is fired, and then modify the trigger to only fire when the Boolean is FALSE.

1. 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. Use an Email Alert with Flow Builder. B. Use a Workflow Email Alert. C. Use SingleEmailMessage() with an Apex trigger. D. Use MassEmailMessage() with an Apex trigger.

A. Use an Email Alert with Flow Builder.

1. Refer to the Lightning component below. <lightning:button label="Save" onclick="ile.handleSave}" /> { { handleSave: Function (component, event, helper) ( helper.saveAndRedirect (component); } }} The Lightning Component allows users to click a button to save ther 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. Use console.log() messages in the Javascript B. Use Developer Console to view checkpoints. C. Use the browser's dev tools to debug the JavaScript D. Enable Debug Mode for Lightning components for the user E. Use Developer Console to view the debug

A. Use console.log() messages in the Javascript C. Use the browser's dev tools to debug the JavaScript D. Enable Debug Mode for Lightning components for the user

1. In an organization that has multi-currency enabled, a developer is tasked with building a Lightning component that displays the top ten opportunities mostly recently accessed by the logged in user The developer must ensure the Amount and LastModifiedDate held 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? A. Use the format () function in the SOQL query B. Use spots expressions to format the values retrieved via SOQL C. Use the FOR VIEW clause in the SOQL query D. Use a wrapper class to format the values retrieved via SOQL

A. Use the format () function in the SOQL query

1. 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 develop must ensure the Amount and LastmodifiedDate field values are displayed according to the user's local What is the most effective approach to ensure values displayed respect the user's locale settings? A. Use the roar function in the SOQL query. B. Use REUX expressions to format the values retrieved via SOQL C. Use a wrapper class to format the values retrieved via SOQL D. Use the TOR VIEW clause in the SOQL query

A. Use the roar function in the SOQL query.

1. Which three Visualforce components can be used to initiate Ajax behavior to perform partial page updates? Choose 3 answers A. <apex:fom> B. <apex:commandButton> C. <apex:actionSupports> D. <apex:actionStatus> E. <apex:commandLinks

B. <apex:commandButton> C. <apex:actionSupports> E. <apex:commandLinks

1. A developer created a Lightning web component that allows users to input a text value that is used to search for Accounts by calling an Apex method, The Apex method returns a list of Account wrappers and is called imperatively from JavaScript event handler. 01: 02: public class Accountsearcher { 03: 04: Public static List<AccountWrapper> search (String tern) ( 05: List<AccountWrapper> wrappers = getMatchingAccountWrappers (term): 06: return wrappers: 07:. } 08: 09: 10: Public class AccountWrapper { 11: Public Account { get; set; } 12: Public Decimal matchProbability (get; set; } 13: } 14: //...other methods, including getMatchingAccountWrappers implementation... Which two changes should the developer make so the Apex method functions correctly? Choose 2 answers A. Add @AuraEnables to line 09. B. Add @AuraEnabled to line 03. C. Add @AuraEnables to lines 11 and 12. D. Add @AuraEnables to line 01.

B. Add @AuraEnabled to line 03. C. Add @AuraEnables to lines 11 and 12.

1. Part of a custom Lightning component displays the total number of Opportunides in the org, which are in the millions. The Lightning component uses an Apex method to get the data it needs. What is the optimal way for a developer to get the total number of Opportunities for the Lightning component? A. SUM() SOQL aggregate query on the Opportunity object B. COUNT () SOQL aggregate query on the Opportunity object C. SOQL for loop that counts the number of Opportunities records D. Apex batch job that counts the number of Opportunity records

B. COUNT () SOQL aggregate query on the Opportunity object

1. Which use case can be performed only by using asynchronous Apex? A. Updating a record after the completion of an insert B. Calling a web service from an Apex trigger C. Making a call to schedule a batch process to complete in the futur D. Processing tens of thousands of records

B. Calling a web service from an Apex trigger

1. A developer wants to write a generic Apex method that will compare the Salesforce Name field between any two object records. For Example, to compare the Name field of an Account and an Opportunity; or the Name of an Account and a Contact. Assuming the Name field exists, how should the developer do this? A. Use a String replace method to parse the contents of each Name field and then compare the results. B. Cast each object into an sObject and use objec.get{'Name'} to compare the Name fields. C. Use the Salesforce Metadata API to extract the value of each coject and compare the Name fields. D. Invoke a Schema.describe function to compare the values of each Name field.

B. Cast each object into an sObject and use objec.get{'Name'} to compare the Name fields.

1. Universal Containers implements a private sharing model for the Convention Attendee e 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 Read/Write 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? A. Create criteria-based sharing rules on the Convention Attendee custom object to share the records with the Event Reviewers. B. Create an after insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing. C. Create a criteria-based sharing rule on the Convention Attendee custom object to share the records with a group of Event Reviewers. D. Create a before insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.

B. Create an after insert trigger on the Convention Attendee custom object, and use Apex Sharing Reasons and Apex Managed Sharing.

1. A developer needs to store variables to control the style and behavior of a Lightning Web Component. Which feature can be used to ensure that the variables are testable in both Production and all Sandboxes? A. Custom variable B. Custom metadata C. Custom setting D. Custom object

B. Custom metadata

1. An org records customer order information in a custom object. Ceang_c, that has fields for the shipping address. A developer is tasked with adding code to calculate shipping charges on an order, based on a flat percentage rate associated with the region of the shipping address What should the developer use to store the rates by region, so that when the changes are deployed to production no additional steps are needed for the calculation to work?" A. Custom abject B. Custom metadata type C. Custom list setting D. Custom hierarchy setting

B. Custom metadata type

Consider the following code snippet: Import {Lighting Element} from 'lwc'; Import getOrder from '@apex/Order controller,getAvailableOrder'; Export default class OrderManagement extends LightningElement { Orders; Error; @wire(getOrders) WiredOrdera({ error, data}) { If (data) { this.orders= data; this.error = undefined; } else if (error) { this.error = error; this.orders = undefined; } } } When the component is deployed an error is reported. Which two changes should the developer implement in the code to ensure the component deploys successful Choose 2 answers A. Import {Lightning Element, api} from 'lwo'; B. Import getOrder from '@saleaforce/Apex/OrderController, getAvailableOrders'; C. Import getOrder from '@saleaforce/Apex/c.OrderController, getAvailableOrders'; D. Import {Lightning Element, wire} from 'lwo';

B. Import getOrder from '@saleaforce/Apex/OrderController, getAvailableOrders'; D. Import {Lightning Element, wire} from 'lwo';

1. Just prior to anew deployment the Salesforce administrator who configured a new order fulfillment process feature in a developer sandbox, suddenly left the company. As part of the UAT cycle the user's had fully tested all of the changes in the sandbox and singed off on them ; making the order fulfillment feature ready for the it's golive in the production environment. Unfortunately although a change set was started, it was not completed by the former administrator. A developer is brought in to finish the deployment. What should the developer do to identify the configuration changes that need to be moved into production? A. Use the Metadata API and a supported development IDE to push all of the configuration form the sandbox into production to ensure no changes are lost. B. Leverage the setup Audit Trail to review the changes made by the departed administrator and identify which change should be added to the change set. C. Set up continuous integration and a git repository to Automatically merge all changes from the sandbox metadata with the production metadata. D. In Salesforce setup, look at the last modified data fir every object to determine which should be added to the change se

B. Leverage the setup Audit Trail to review the changes made by the departed administrator and identify which change should be added to the change set.

1. A developer is tasked with creating a Lightning and component that is responsive on various devices. Which two components should help accomplish this goal? Choose 2 answers A. Lightning - navigation B. Lightning - layout - item C. Lightning- input - location D. Lightning- layout

B. Lightning - layout - item D. Lightning- layout

1. 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 requirement? Choose 2 answers A. Process Builder B. Lightning web component C. Apex method that returns a Continuation object D. Screen Flow

B. Lightning web component C. Apex method that returns a Continuation object

1. Assuming the CreateoneAccount class creates one account and implements the Queueable interface, which syntax properly tests the Apex code? A. List Account> accts: System.enqueueJob) new CreateOneAccount() ); Test.getFlexQueueOrder(): System.assertEquals 1, acota.size()); B. List<Account> accts: Test.startTest(); System.enqueue Job new CreateOneAccount() ); Test.stopTest(); accts- [SELECT Id FRCM Account]: System.assertEquals( 1, accts.size() ): C. List<account> accts; System.enqueueJob( new CreateOneAccount() ); Accts- (SELECT Id FROM Account]: System.assertEquals(1, accts.size() }; D. List<account> accts; System.enqueueJob( new CreateOneAccount() ); Test.startTest(); System.enqueue Job new CreateOneAccount() ); Test.stopTest();

B. List<Account> accts: Test.startTest(); System.enqueue Job new CreateOneAccount() ); Test.stopTest(); accts- [SELECT Id FRCM Account]: System.assertEquals( 1, accts.size() ):

1. A developer is creating a Lightning web component that contains a child component. The property stage is being passed from the parent to the child. The property is changing, but the set Opp List function is not being invoked. All stage; Oppa; Connected callback() { This.oppa = this.setOppList(this stage); } } What should the developer change to allow this? A. Create a custom event from the parent component to set the property. B. Move the logic to a getter/setter pair. C. Move the logic from connected callback() to constructor(). D. Move the logic from connected Callback() to rendered callback().

B. Move the logic to a getter/setter pair.

1. An org has an existing process built using process Builder on opportunity that sets a custom field, commissionBaseAmount_c, when an opportunity is edited and the opportunity amount changes. A developer recently deployed and opportunity before update trigger that uses the CommissionBaseAmount_c and complex logic to calculate a value for a custom filed, CommissionBaseAmount_c when an opportunity stage changes to closed/won. Users report that when they change the opportunity to closed/won and also change the amount during the same save, the CommissionBaseAmount_c is incorrect. Which action should the developer take to correct this problem? A. Call the trigger from the process B. Replace the process with a Fast Field update record-trigger flow C. Call the process form the trigger.

B. Replace the process with a Fast Field update record-trigger flow

1. 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. Use B. Report C. Profile D. RecordType

B. Report

1. A developer is debugging an Apex-based order creation process that has a requirement to have three savepoints, SP1, SP2, and SP3 (created in order), before the final execution of the process. During the final execution process, the developer has a routine to roll back to SP1 for a given condition. Once the condition is fixed, the code then calls a roll back to SP3 to continue with final execution. However, when the roll back to SP3 is called, a runtime error occurs. Why does the developer receive a runtime error? A. The developer should have called SP2 before calling SP3.. B. SP3 became invalid when SP1 was rolled back. C. The developer used too many savepoints in one trigger session. D. The developer has too many DML statements between the savepoints.

B. SP3 became invalid when SP1 was rolled back.

1. A company has a Lightning page with many Lightning Components, some that cache reference data. It is reported that the page does not always show the most current reference data. What can a developer use to analyze and diagnose the problem in the Lightning page? A. Salesforce Lightning Inspector Event Log tab B. Salesforce Lightning Inspector Storage tab C. Salesforce Lightning Inspector Transactions tab D. Salesforce Lightning Inspector Actions tab.

B. Salesforce Lightning Inspector Storage tab

1. 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. The callouts will be made in an Apex test class. B. The callouts will be made in an Apex trigger. C. Over 10 callouts will be made in a single transaction. D. The callout could take longer than 60 seconds to complete.

B. The callouts will be made in an Apex trigger.

1. A company accepts orders for customers in their enterprise resource planning (ERP) system that must be integrated Into Salesforce as Order records with a lockup field to Account. The Account object has an external ID field, IRP_Customer_20___ What should the integration use to create new Order records that will automatically be related to the correct Account? A. Insert on the _c object followed by an update on the Order_c object. B. Upsert on the Order_c object and specify the EFF_Customer_20_o for the Account relationship. C. Merge on the Oder_c object and specify the ERF_Customer_ID_c for the Account relationship. D. Upsert on the Account and specify the ERF_Customer_ID_c for the relationship

B. Upsert on the Order_c object and specify the EFF_Customer_20_o for the Account relationship.

1. 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? A. Use system profilele) to test as an administrator and a community user. B. Use system.runas) to test as a sales rep and a community user. C. system. Profile le to test as a sales rep and a community user D. Use System.runAs() to test as an administrator and a community user

B. Use system.runas) to test as a sales rep and a community user.

1. Get Cloudy Consulting (GCC) has a multitude of servers that host its customers websites. GCC wants to provide a servers status page that is always on display in its call center. It should update in real time with any changes made to any servers. To accommodate this on the server side, a developer created a Server Update platform event. The developer is working on a Lightning web component to display the information. What should be added to the Lightning web component to allow the developer to interact with the Server Update platform event? A. Import {subscribe, unsubscribe, onError) from lightning/pubsub' B. import {subscribe, unsubscribe, onError) from lightning/empAPI'; C. import {subscribe, unsubscribe, onError) from lightning/ServerUpdate' D. import {subscribe, unsubscribe, onError) from lightning/MessageChannel'

B. import {subscribe, unsubscribe, onError) from lightning/empAPI';

Which tag should a developer use to display different text while an <apex:command button> is processing an action? A. <apex:actionFoller> B. <apex:pageMessages> C. <apex:actionStatus> D. <apex:actionSupport>

C. <apex:actionStatus>

1. A developer is asked to create a Lightning web component that will be invoked via a button on a record page. The component must be displayed in a modal dialog. Which three steps should the developer take to achieve this? Choose 3 answers A. In targetConfigs, add lightning_AppPage as a target. B. Set event Type to Action. C. Add a targetConfig and set targets to lightning_RecordAction D. Set actionType to ScreenAction. E. In targets, add lightning_RecordAction as a target.

C. Add a targetConfig and set targets to lightning_RecordAction D. Set actionType to ScreenAction. E. In targets, add lightning_RecordAction as a target.

1. Universal Containers (UC) calculates commissions on their Opportunities in different ways based on complex rules that vary depending on the line of business of the Opportunity. Whenever a new line of business is added to Salesforce at UC, it is likely that a different calculation will need to be added too. When an Opportunity's stage is changed to Closed/Won, its commission should be calculated in real time. What should a developer use so that different implementations of the commission calculation can be invoked on the stage change? A. A final class with multiple method B. Apex Describe Schema method C. An Apex class with a custom enum D. An interface and implementing classes

C. An Apex class with a custom enum

1. 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. A custom list view on the junction object with filters that will show the proper records based on owner B. A Lightning web component on the Community Home Page that uses Lightning Data Services. C. An Apex trigger that creates Apex managed sharing records based on the junction object's relationships D. A Visualforce page that uses a custom controller that specifies without sharing to expose the records

C. An Apex trigger that creates Apex managed sharing records based on the junction object's relationships

1. The Account object has a field, Audit Codec that is used to specify what type of auditing the Account needs and a Lookup to use Auditore, that is the assigned auditor. When an Account is initially created, the user specifies the Audit Codec. Each User in the org has a unique text fald that is used to automatically assign the correct user to the Account's Auditore field. trigger AccountTrigger en Account (before insert) ( AuditAssigner.setAuditor (Trigger.new): } public class Auditãssioner [ . public static void setAuditor (List<Account> accounts) { for User u: [SELECT Id, Audit Code_c From user]) { for Account & : accounts) { if (u.Audit Code_ca.Audit_Code_c) { a.Auditor c-u.Id: } } } } } What should be changed to most optimize the code's efficiency? Choose 2 answers A. Build a Map<String, List<Account>> of audit code to accounts. B. Add an initial SOQL query to get all distinct audit codes. C. Build a Map 16, List<String>> of Account Id to audit codes. D. Add a WHERE clause to the SOQL query to filter on audit codes.

C. Build a Map 16, List<String>> of Account Id to audit codes. D. Add a WHERE clause to the SOQL query to filter on audit codes.

1. Which use case can be performed only by using asynchronous Apex? A. Updating a record after the completion of an insert B. Querying tens of thousands of records C. Calling a web service from an Apex trigger D. Making a call to schedule a batch process to complete in the future.

C. Calling a web service from an Apex trigger

1. A developer is tasked with creating an application-centric feature on which end-users can access and update information. This feature must be available in Lightning Experience while working seamlessly in multiple device form factors, such as desktops, phones, and tablets. Additionally, the feature must support Addressable URL Tabs and interact with the Salesforce Console APts. What are two approaches a developer can take to build the application and support the business requirements? Choose 2 answers A. Create the application using Lightning Experience Builder B. Create the application using Aura Components wrapped in Lightning Web Components. C. Create the application using Aura Components D. Create the application using Lightning Web Components wrapped in Aura Components.

C. Create the application using Aura Components D. Create the application using Lightning Web Components wrapped in Aura Components.

1. A software company uses a custom object, erect_e, to track defects in their software. Detecte has organization-wide defaults set to private. Each Defect 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 record read only access to the Defect record on the Reviewer record? A. Apex managed sharing B. View All on Defect_c C. Criteria-based sharing D. Lightning web component

C. Criteria-based sharing

1. An org records customer order information in a custom, object order_c, that has fields for the shipping address. A developer is tasked with adding code to calculate shipping charges on an order, based on a fat percentage rate associated with the region of the shipping address What should the developer use to store the rates by region, so that when the changes are deployed to production no additional steps are needed for the calculation to work A. Custom list setting B. Custom hierarchy setting C. Custom metadata type D. Custom object

C. Custom metadata type

1. How should a developer reference a third-party JavaScript library from a Lightning component? A. From an asset file. B. From a document C. From a static resource D. From a third-party URL

C. From a static resource

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 bybthe Schedule Apex has recently increased to more than 10,000. What should the developer do to eliminate the limit exception error? A. Use platform events. B. Use the @future annotation C. Implement the Batchable interface D. Implement the Queueable interface.

C. Implement the Batchable interface

1. 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. Use platform events. B. Use the future annotation. C. Implement the Batchable interface. D. Implement the Queable interface.

C. Implement the Batchable interface.

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 call-out. Which two elements should the developer use to implement these business requirements? Choose 2 answers A. Process Builder B. Screen Flow C. Lightning Web component D. Apex method that returns a continuation object

C. Lightning Web component D. Apex method that returns a continuation object

1. Assuming the CreateoneAccount class creates one account and implements the Queueable interface, which syntax properly tests the Apex code? A. List Account> accts: System.enqueueJob) new CreateOneAccount() ); Test.getFlexQueueOrder(): System.assertEquals 1, acota.size()); B. List<account> accts; System.enqueueJob( new CreateOneAccount() ); Test.startTest(); System.enqueue Job new CreateOneAccount() ); Test.stopTest(); C. List<Account> accts: Test.startTest(); System.enqueue Job new CreateOneAccount() ); Test.stopTest(); Accts- [SELECT Id FRCM Account]: System.assertEquals( 1, accts.size() ): D. List<account> accts; System.enqueueJob( new CreateOneAccount() ); Accts- (SELECT Id FROM Account]: System.assertEquals(1, accts.size() };

C. List<Account> accts: Test.startTest(); System.enqueue Job new CreateOneAccount() ); Test.stopTest(); Accts- [SELECT Id FRCM Account]: System.assertEquals( 1, accts.size() ):

1. Which statement is true regarding save points? A. Savepoints are not limited by DML statement governor limits. B. You can roll back to any savepoints variable created in any order C. Static variables are not reverted during a rollback. D. Reference to savepoints can cross trigger invocation

C. Static variables are not reverted during a rollback.

1. 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. The callout could take longer than 60 seconds to complete. B. Over 10 callouts will be made in a single transaction. C. The callouts will be made in an Apex trigger. D. The callouts will be made using the REST API.

C. The callouts will be made in an Apex trigger.

1. 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. The record can be shared using a sharing rule. B. The record can be shared using a permission set C. The record can be shared using an Apex class. D. The record cannot be shared with the current setup.

C. The record can be shared using an Apex class.

1. 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 field assertion? A. The test class has not defined an Account owner when inserting the test data. B. The test class is not using system.runAs() to run tests as a Salesforce administrator, C. The test class has not re-queried the Account record after updating the Opportunity. D. The test class has not implemented seeALLData true in the test method.

C. The test class has not re-queried the Account record after updating the Opportunity.

1. A company uses Opportunities to track sales to their customers and their org has millions of Opportunities. They want to begin track revenue over time through a related revenue object. As part of their initial implementation, they want to perform a one-time seeding of their data by automatically creating and populating revenue records for Opportunities, based on complex logic. They estimate that roughly 100,000 Opportunities will have Revenue records created and populated. What is the optimal way to automate this? A. Use System.scheduleJob() to schedule a Database.Scheduleableclass B. Use system.enqueueJob() to invoke a Queueable class C. Use Database.executeBatch() to invoke a Database.Batcbable class. D. Use Database.executeBatch() to invoke a Queueable class

C. Use Database.executeBatch() to invoke a Database.Batcbable class.

1. A Visualforce page loads slowly due to the large amount of data it displays. Which strategy can a developer use to improve the performance? A. Use the transient keyword for the List variables used in the custom controller. B. Use an <apex:actionPoller> in the page to load all of the data asynchronously. C. Use lazy loading to load the data on demand, Instead of in the controller's constructor. D. Use Javascript to move data processing to the browser instead of the controller.

C. Use lazy loading to load the data on demand, Instead of in the controller's constructor.

1. An org has a requirement that an Account must always have one and only one Contact listed as Primary. So selecting one Contact will de-select any others. The dient wants a checkbox on the Contact called 'Is Primary to control this feature. The client also wants to ensure that the last name of every Contact is stored entirely in uppercase characters. What is the optimal way to implement these requirements? A. Write an after update trigger on Account for the Is Primary logic and a before update trigger on Contact for the last name logic B. Write an after update trigger on Contact for the Is Primary logic and a separate before update trigger on Contact for the last name logic C. Write a single trigger on Contact for both after update and before update and callout to helper classes to handle each set of logic D. Write a Validation Rule on the Contact for the Is Primary logic and a before update Trigger on Contact for the last name logic.

C. Write a single trigger on Contact for both after update and before update and callout to helper classes to handle each set of logic

1. 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? A. An HTTP REST callout for the billing callout and a Continuation for the tax callout B. An HTTP REST callout for both the billing callout and the tax callout C. A Continuation for the billing callout and an HTTP REST callout for the tax callout D. A Continuation for both the billing callout and the tax callout.

D. A Continuation for both the billing callout and the tax callout.

1. A developer is working on a set of custom Aura components that can be individually added to a home page. One of the components, eteearchAccounts, allows users to search for an Account and then select a specific found Account. Once selected, the other components should get other information related to the selected Account and display it. Which event should the c:searchaccount component fire to make it known that an Account is selected? A. An application event B. A refreshView event C. A publish event D. A component event

D. A component event

1. Users report that a button on a custom Lightning web component is not working. However, there are no other details provided. What should the developer use to ensure error messages are properly displayed? A. Add the <apex: messages/> tag to the component. B. Add a try-catch block surrounding the DML statement. C. Use the Database method with all or None set to false. D. Add JavaScript and HTML to display an error message.

D. Add JavaScript and HTML to display an error message.

1. A developer is building a Lightning web component that displays quantity, uhit price, and the total for an order line item. The total is calculated dynamically as the quantity multiplied by the unit price. JavaScript: Import { LightningElement} from 'lwc' export default class Orderlineltem extends LightningElement ( @api quantity: @api unitPrice: } Template Markup: <template> <div> Quantity: (quantity) <br /> Unit Price: (unitPrice) <br />. </div> </template> What must be added to display the total? A. Add Total: (multiply(quantity, unitPrice)) in the template. B. Add Total: {quantity" unitPrice) in the template. C. Add calculateTotal() (return quantity "unitPrice;. )to the JavaScript and Total: (calculate total 1() in the template. D. Add get total () { return quantity" unitPrice;. } to the JavaScript and Total: (total) in the template.

D. Add get total () { return quantity" unitPrice;. } to the JavaScript and Total: (total) in the template.

1. A developer is working with existing functionality that tracks how many times a stage has changed for an Opportunity. When the Opportunity's stage is changed, a workflow rule is fired to increase the value of a field by one. The developer wrote an after trigger to create a child record when the field changes from 4 to 5. A user changes the stage of an Opportunity and manually sets the count field to 4. The count field updates to 5, but the child record is not created. What is the reason this is happening? A. After triggers fire before workflow rules. B. Trigger. Old does not contain the updated value of the count field. C. Trigger. New does not change after a field update. D. After triggers are not fired after field updates.

D. After triggers are not fired after field updates.

1. A company manages information about their product offering in custom objects named catalog and catalog item. Catalog item has a master detail field to catalog, and each catalog may have as many as 100,000 catalog items. Both custom object have a currencyIsoCodes text filed that contains the currency code the should use. If a catalog currencyIsoCodes changes all of its catalog items currencyIsoCodes should be changed as well. What should a developer use to update the currencyIsoCodes on the catalog items when the catalog currencyIsoCodes changes? A. An after insert trigger on catalog that updates the catalog items I'd the catalog currencyIsoCodes is different. B. An Database.schedulable and Database.Batchable class that queries the catalog object and update the catalog items if the catalog currencyIsoCodes is different. C. An after insert trigger on catalog that updates the catalog items if the catalog currencyIsoCodes is different. D. An Database.schedulable and Database.Batchable class that queries the catalog item object and update the catalog items if the catalog currencyIsoCodes is different

D. An Database.schedulable and Database.Batchable class that queries the catalog item object and update the catalog items if the catalog currencyIsoCodes is different

1. 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. Public void updateAndakeCalloutMap<Id. Request_c> reqs, tapeId, Request_Line_> reqLines) { Savepoint ap Database.setSavepoint(); Try { Insert reqs.values(); Insert reqlines.values(); HttpResponse response = CalloutUtil.makeRestCallout (reqs.keyset(), reqzines.keySet()); 1 catch (Exception e) { Database.rollback (ap)/ System.debug€z } } The calloutUtil.makeRest Callout fails with a "You have uncommitted work pending. Please commit or rollback before calling out' error. What should be done to address the problem? A. Move the calloutUtil.makeRestCallout method call below the catch block. B. Change the calloutUtil.makeRestCallout to an @InvocableMethod method. C. Remove the Database.setSavepoint and Database.rollback. D. Change the calloutUtil.makeRestCallout to an @futureMethod method.

D. Change the calloutUtil.makeRestCallout to an @futureMethod method.

1. A developer is asked to find a way to store secret data with an ability to specify which profiles and users can access which secrets. What should be used to store this data? A. Static resources B. Custom metadata C. System.Cookie class D. Custom settings

D. Custom settings

Which method should be used to convert a Date to a string in the current users locale? A. String.format B. String.valueOr C. Date.parse D. Date.format

D. Date.format

1. A developer created a Lightning web component that uses a lightning-record-edit-tom 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. What is the recommended approach to perform validations on more than one field, and display multiple error messages simultaneously with minimal JavaScript intervention? A. Try/catch/finally block B. Apex trigger C. Validation rules D. External JavaScript library

D. External JavaScript library

1. A developer is building a Ughtning web component that searches for Contacts. The component must communicate the search results to other unrelated Ughtning web components, that are in different DOM trees, when the search completes. What should the developer do to implement the communication? A. Publish an event on an event channel. B. Publish a message on a message channel. C. Fire an application event. D. Fire a custom component event.

D. Fire a custom component event.

1. Get Cloudy Consulting (GCC) has a multitude of servers that host its customers' websites, GCC wants to provide a servers status page that is always on display in its call center should update in real time with any changes made to any servers. To accommodate this on the server side, a developer created a Server Update platform even The developer is working on a Lightning web component to display the information. What should be added to the Lightning web component to allow the developer to interact with the Server Update platform event? A. Import {subscribe, unsubscribe, onError) from 'lightning/ServerUpdate' B. import {, unsubscribe, onError} from 'lightning/terrageChannel' C. Import ( subscribe, unsubscribe, onErro) from 'lightning/pubsub' D. Import subscribe, unsubscribe, onError) from lightning/empApi';

D. Import subscribe, unsubscribe, onError) from lightning/empApi';

1. Universal Containers uses Salesforce to manage its product offerings to customers. A developer is building a custom mobile app that must allow app users to view product information, in real time, that is stored in Salesforce. What should the developer use to get the product information from Salesforce? A. SOAP API B. User Interface API C. Streaming API D. REST API

D. REST API

1. Refer to the markup below: <template> <!--... other code ... <lightning-record-form . Record-id=recordId) Object-api-name="Account" Layout-type="Full"> </lightning-record-form> </template> A Lightning web component displays the Account name and two custom fields out of 275 that exist on the object. The custom fields are correctly declared and populated, However the developer receives complaints that the component performs slowly. What can the developer do to improve the performance? A. Replace Layout-type="full" with layout-type="partial" B. Add density compass to the component. C. Add cache="true" to the component. D. Replace Layout-type="null" with fields(fields)

D. Replace Layout-type="null" with fields(fields)

1. Refer to the markup below: <template> <!--,,, other code... ---> <lightning-record-form Record-id= (recordId) Object-api-name="Account" Layout-type "Full"> </lightning-record-form> </template> A Lightning web component displays the Account name and two custom fields out of 275 that exist on the object. The custom fields are correctly declared and populated. However, the developer receives complaints that the component performs slowly. What can the developer do to improve the performance? A. Replace layout-types"Full" with layout-type="Partial" B. Add caches"= true" to the component. C. Add density-"compact" to the component. D. Replace layout-type="Full" with fields-(fields).

D. Replace layout-type="Full" with fields-(fields).

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. Profile B. User C. Record type D. Report

D. Report

1. A developer wrote the following method to find all the test accounts in the org: Public static Account[ ] searchTestaccounts() List<List<5object>> searchlist = {FIND 'test' IN ALL FIELDS RETURNING Account (Name)]; Return (Account[ ]) searchlist = [0]; } However, the test method below fails. @isTest Public static void testSearchTestAccounts(){ Account a = new Account (name='test'); Insert a; Account II accounts TestAccountFinder.searchTestRccounts(); System.assert (accounts.size() == 1); } What should be used to fix this falling test? A. Test.loadData to set up expected data, B. @teatSetup method to set up expected data C. @isTest (SeeAllData-true) to access org data for the test D. Test.FixedSearchResults() method to set up expected data

D. Test.FixedSearchResults() method to set up expected data

1. There as an Apex controller and a Visualforce page in an org that displays records with a custom filter consisting of a combination of picklist values selected. The page takes too long to display results for some of the input combinations, while for other input choices it throws the exception. "Maximum view state size limit exceeded. What step should the developer take to resolve this issue? A. Remove instances of the transient keyword from the Apex controller to avoid the view state error B. Adjust any code that filters by picklist values since they are not indexed. C. Split the layout to filter records in one Visualforce page and display the list of records in a second page using the same Apex controller D. Use a StandardSetController or SOQL LIMIT in the Apex controller to limit the number of records displayed at a time.

D. Use a StandardSetController or SOQL LIMIT in the Apex controller to limit the number of records displayed at a time.

1. A developer crested an Apex class that updates an Account based on input from a Lightning web component that is used to register an Account. The update to the Account should mly be made if it has not already been registered. Account = (SELECT Id, Is Registered FROM Account WHERE Id = accountId); If (!account.Is_Registered_c) { account.Is_Registered= true; //..set other account fields... Update account; } What should the developer do to ensure that users do not overwrite each other's updates to the same Account if they make updates at the same time? A. Use upsert instead of update. B. Use Database update (account, false). C. Add a try/catch block around the update D. Use for update in a SOQL query.

D. Use for update in a SOQL query.

1. A developer has working business logic code, but sees the following error in the test class: You have uncommitted work pending. Please commit or rollback before calling out. What is a possible solution? A. Rewrite the business logic and test classes with @TestVisible set on the callout. B. Call support for help with the target endpoint, as it is likely an external code error. C. Set seeALLData to true at the top of the test class, since the code does not fail in practice. D. Use test.IsRunningTest() before making the callout to bypass it in test execution.

D. Use test.IsRunningTest() before making the callout to bypass it in test execution.

1. Refer to the following code snippets: My Opportunities.js Import LightningElement, api, wire) from 'lwc'; import getOpportunities from '@salesforce/apex/OpportunityController.findyopportunitie Export default class Myopportunities extends LightningElement ( @api: userid; @wire (getOpportunities, (oppoumer: 'Suserid")) Opportunities; } OpportunityController.cls Public with sharing class OpportunityController ( @AuraEnabled Public static List Opportunity, findtyopportunities in oppowner) return { SELECT Id, Name, Amount FROM Opportunity WHERE OWNER Id=:oppowner WITH SECURITY_EXFORCED LIMIT 10 }; } } A developer is experiencing issues with a Lightning web component. The component must surface information about Opportunities owned by the currently logged-in user. When the component is rendered, the following message is displayed: "Error retrieving data". Which modification should be implemented to the Apex class to overcome the issue? A. Use the Continuation true attribute in the Apex method B. Edit the code to use the without sharing keyword in the Apex class C. Ensure the OWD for the Opportunity object is Public. D. Use the Cacheable true attribute in the Apex method.

D. Use the Cacheable true attribute in the Apex method.

1. 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 slow for 10.000 emals 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. Use a Workflow Email Alert. B. Use SingleEmailMessage() with an Apex trigger. C. Use MassEmailMessage () with an Apex trigger. D. use an Email Alert with Flow Builder.

D. use an Email Alert with Flow Builder.


Kaugnay na mga set ng pag-aaral

Fundamentals OVERALL QUESTIONS NEED TO BE REVIEWED

View Set

Genetics Quiz 3 + video questions

View Set

Successful Project Management 6e Chapters 1 - 5

View Set