Salesforce Plataform developer I
![]() |
![]() |
![]() |
Título del Test:![]() Salesforce Plataform developer I Descripción: Plataform developer I Salesforce |




Comentarios |
---|
NO HAY REGISTROS |
A Salesforce administrator used Flow Builder to create a flow named "accountOnboarding". The flow must be used inside an Aura component. Which tag should a developer use to display the flow in the component?. lightning: flow. lightning-flow. aura-flow. aura: flow. A developer is alerted to an issue with a custom Apex trigger that is causing records to be duplicated. What is the most appropriate debugging approach to troubleshoot the issue?. Review the Historical Event logs to identify the source of the issue. Add system.debug statements to the code to track the execution flow and identify the issue. Use the Apex Interactive Debugger to step through the code and identify the issue. Disable the trigger in production and test to see if the issue still occurs. Universal Containers wants to ensure that all new leads created in the system have a valid email address. They have already created a validation rule to enforce this requirement, but want to add an additional layer of validation using automation. What would be the best solution for this requirement?. Submit a REST API Callout with a JSON payload and validate the fields on a third party system. Use an Approval Process to enforce the completion of a valid email address using an outbound message action. Use a before-save Apex trigger on the Lead object to validate the email address and display an error message if it is invalid. Use a custom Lightning Web component to make a callout to validate the fields on a third party system. A developer is creating a page that allows users to create multiple Opportunities. The developer is asked to verify the current user's default Opportunity record type, and set certain default values based on the record type before inserting the record. How can the developer find the current user's default record type?. Use the schema.userinfo.opportunity.getDefaultRecordType() method. Create the opportunity and check the opportunity.recordType, which will have the record ID of the current user's default record type, before inserting. Use Opportunity.sobjectType.getDescribe().getRecordTypeInfo() to get a list of record types, and iterate through them until isDefaultRecordTypeMapping() is true. Query the Profile where the ID equals userinfo.getProfileID() and then use the profile.Opportunity.getDefaultRecordType() method. A developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunityLineItem trigger. Which method allows access to the price book?. Use IsTest (SeeAllData=true and delete the existing standard price book. Use Test.getStandard PricebookId() to get the standard price book ID. Use @TestVisible to allow the test method to see the standard price book. Use Test.loadData() and a static resource to load a standard price book. What should a developer do to check the code coverage of a class after running all tests?. View the Code Coverage column in the list view on the Apex Classes page. View the code coverage percentage for the class using the Overall Code Coverage panel in the Developer Console Tests tab. Select and run the class on the Apex Test Execution page in the Developer Console. View the Class Test Percentage tab on the Apex Class list view in Salesforce Setup. A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system. Within the class, the developer identifies the following method as a security threat: List<Contact> performSearch (String lastName) { return Database.query('SELECT Id, FirstName, LastName FROM Contact WHERE LastName Like +lastName + '%'); What are two ways the developer can update the method to prevent a SOQL injection attack? Choose 2 answers. Use the @Readonly annotation and the with sharing keyword on the class. Use variable binding and replace the dynamic query with a static SOQL. Use a regular expression expression on the parameter to remove special characters. Use the escapesingleQuotes method to sanitize the parameter before its use. What are two characteristics related to formulas? Choose 2 answers. Fields that are used in a formula field can be deleted or edited without editing the formula. Formulas can reference values in related objects. Formulas can reference themselves. Formulas are calculated at runtime and are not stored in the database. What should a developer use to script the deployment and unit test execution as part of continuous integration?. VS Code. Developer Console. Salesforce CLI. Execute Anonymous. A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple sObjects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URL. Which three statements are useful inside the unit test to effectively test the custom controller? Choose 3 answers. String nextPage = controller.save().getUrl();. insert pageRef;. ApexPages.currentPage().getParameters ().put('input', TestValue');. public Extended Controller (ApexPages.StandardController entrl) { }. Test.setCurrentPage (pageRef);. Universal Containers wants to back up all of the data and attachments in its Salesforce org once a month. Which approach should a developer use to meet this requirement?. Use the Data Loader command line. Create a Schedulable Apex class. Define a Data Export scheduled job. Schedule a report. What should a developer use to fix a Lightning web component bug in a sandbox?. . Force.com IDE. Developer Console. VS Code. Execute Anonymous. A credit card company needs to implement the functionality for a service agent to process damaged or stolen credit cards. When the customers call in, the service agent must gather many pieces of information. A developer is tasked to implement this functionality. What should the developer use to satisfy this requirement in the most efficient manner?. Apex trigger. Screen-based flow. Lightning Component. Approval process. A custom Visualforce controller calls the ApexPages.addMessage () method, but no messages are rendering on the page. Which component should be added to the Visualforce page to display the message?. <apex:message for="info"/>. <apex: facet name="messages" />. <apex:pageMessages />. . <apex:pageMessage severity="info" />. A developer must troubleshoot to pinpoint the causes of performance issues when a custom page loads in their org. Which tool should the developer use to troubleshoot query performance?. Setup Menu. AppExchange. Developer Console. Visual Studio Code IDE. Consider the following code snippet for a Visualforce page that is launched using a Custom Button on the Account detail page layout. <apex:page standardController="Account"> <!-- additional UI elements --> <apex:commandButton action="{!save}" value="Save"/> </apex:page> When the Save button is pressed the developer must perform a complex validation that involves multiple objects and, upon success, redirect the user to another Visualforce page. What can the developer use to meet this business requirement?. Validation rule. Custom controller. Apex trigger. Controller extension. The Job_application_c custom object has a field that is a master-detail relationship to the Contact object, where the Contact object is the master. As part of a feature implementation, a developer needs to retrieve a list containing all Contact records where the related Account Industry is Technology, while also retrieving the Contact's Job_application__c records. Based on the object's relationships, what is the most efficient statement to retrieve the list of Contacts?. [SELECT Id, (SELECT Id FROM Job_Applications__r) FROM Contact WHERE Accounts.Industry = 'Technology']. [SELECT Id, (SELECT Id FROM Job_Applications__r) FROM Contact WHERE Account.Industry = 'Technology']. [SELECT Id, (SELECT Id FROM Job_Application__r) FROM Contact WHERE Account.Industry = 'Technology']. [SELECT Id, (SELECT Id FROM Job_Applications__r) FROM Contact WHERE Account.Industry = 'Technology']. The following code snippet is executed by a Lightning web component in an environment with more than 2,000 lead records: @AuraEnabled public void static updateLeads() { for (Lead thisLead : [SELECT Origin __c FROM Lead]){ thisLead.LeadSource = thisLead.Origin_ cs update thisLead; } } Which governor limit will likely be exceeded within the Apex transaction?. Total number of DML statements issued. Total number of records processed as a result of DML statements. Total number of records retrieved by SOQL queries. Total number of SOQL queries issued. An Apex method, getaccounts, that returns a list of Accounts given a searchTerm, is available for Lightning Web Components to use. What is the correct definition of a Lightning Web Component property that uses the getaccounts method?. @AuraEnabled (getAccounts, { searchTerm: '$searchTerm' }) accountlist;. @wire (getAccounts, { searchTerm: '$searchTerm' }) accountList;. @AuraEnabled (getAccounts, '$searchTerm') accountList;. @wire (getAccounts, '$searchTerm') accountList;. What is an example of a polymorphic lookup field in Salesforce?. The Whatld field on the standard Event object. The Parentld field on the standard Account object. The Leadld and Contactld fields on the standard Campaign Member object. A custom field, Link__c, on the standard Contact object that looks up to an Account or a Campaign. What are two ways for a developer to execute tests in an org? Choose 2 answers. Tooling API. Bulk API. Developer Console. Metadata API. Universal Containers (UC) wants to lower its shipping cost while making the shipping process more efficient. The Distribution Officer advises UC to implement global addresses to allow multiple Accounts to share a default pickup address. The developer is tasked to create the supporting object and relationship for this business requirement and uses the Setup Menu to create a custom object called "Global Address". Which field should the developer add to create the most efficient model that supports the business need?. . Add a master-detail field on the Global Address object to the Account object. Add a lookup field on the Account object to the Global Address object. Add a master-detail field on the Account object to the Global Address object. Add a lookup field on the Global Address object to the Account object. A software company uses the following objects and relationships: « Case: to handle customer support issues » Defect__c: a custom object to represent known issues with the company's software » case _Defect__c: a junction object between Case and defect__c to represent that a defect is a cause of a customer issue Case and defect__c have Private organization-wide defaults. What should be done to share a specific case_defect__c record with a user?. Share the Case_Defect_ c record. Share the parent Defect__c record. Share the parent Case and Defect__c records. Share the parent Case record. A software company is using Salesforce to track the companies they sell their software to in the Account object. They also use Salesforce to track bugs in their software with a custom object, Bug__c. As part of a process improvement initiative, they want to be able to report on which companies have reported which bugs. Each company should be able t report multiple bugs and bugs can also be reported by multiple companies. What is needed to allow this reporting?. Junction object between Bug__c and Account. Roll-up summary field of Bug__c on Account. Lookup field on Bug__c to Account. Master-detail field on Bug__c to Account. Which statement describes the execution order when triggers are associated to the same object and event?. Triggers are executed in the order they are created. Triggers are executed in the order they are modified. Triggers are executed alphabetically by trigger name. Trigger execution order cannot be guaranteed. Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package application. One of the application modules allows the user to calculate body fat using the Apex class, bodyrat, and its method, calculaterbodyrat (). The product owner wants to ensure this method is accessible by the consumer of the application when developing customizations outside the ISV's package namespace. Which approach should a developer take to ensure calculateBodyFat () is accessible outside the package namespace?. Declare the class and method using the global access modifier. Declare the class as public and use the global access modifier on the method. Declare the class and method using the public access modifier. Declare the class as global and use the public access modifier on the method. A developer creates a custom exception as shown below: public class ParityException extends Exception {} What are two ways the developer can fire the exception in Apex? Choose 2 answers. new ParityExcepcion():;. throw new ParityExcepti0n('parity does not match’);. new ParityException('parity does not match');. throw new ParityException();. Which statement should be used to allow some of the records in a list of records to be inserted if others fail to be inserted?. Database.insert (records, true). Database.insert (records, false). insert records. insert (records, false). Refer to the following Apex code: Integer x = 0; do { x = 1; x++; } while (x <1); System.debug(x); What is the value of x when it is written to the debug log?. 0. 2. 1. 3. A developer is asked to write helper methods that create test data for unit tests. 01: public TestUtils { 02: 03: public static Account createAccount() { 04: Account act = new Account (); 05: // ...set some fields on acct... 06: return act; 07: } 08: //...other methods... 09: } What should be changed in the Testutils class so that its methods are only usable by unit test methods?. Change public to privace on line 01. Add @IsTest above line 03. Add @IsTest above line 01. Remove static from line 03. A developer created a Lightning web component called statuscomponent to be inserted into the Account record page. Which two things should the developer do to make this component available? Choose 2 answers. Add <masterlLabel>Account</masterLabel> to the statusComponent.js-meta.xml file. Add <target>lightning_RecordPage</target> to the statusComponent.js-meta.xml file. Set isExposed to true in the statusComponent. js-meta.xml file. Add <target>lightning_ RecordPage</target> to the statusComponent.js file. What are two ways a developer can get the status of an enqueued job for a class that implements the queueable interface? Choose 2 answers. Query the AsyncApexJob object. View the Apex Flex Queue. View the Apex Jobs page. View the Apex Status page. Which two are phases in the Aura application event propagation framework? Choose 2 answers. Default. Emit. Control. Bubble. Given the following Anonymous block: List<Case> casesToUpdate = new List<Case>(): for (Case thisCase : [SELECT Id, Status FROM Case LIMIT 50000]){ thisCase.Status = 'Working'; casesToUpdate.add(thisCase) ; } try{ Database.update (casesToUpdate, false); }catch (Exception e) { System.debug(e.getMessage ()) ; } What should a developer consider for an environment that has over 10,000 Case records?. The try-catch block will handle any DML exceptions thrown. The try-catch block will handle exceptions thrown by governor limits. The transaction will succeed and changes will be committed. The transaction will fail due to exceeding the governor limit. As part of new feature development, a developer is asked to build a responsive application capable of responding to touch events, that will be executed on stateful clients. Which two technologies are built on a framework that fully supports the business requirement? Choose 2 answers. Visualforce Components. Lightning Web Components. Aura Components. Visualforce Pages. A developer has the following requirements: • Calculate the total amount on an Order. • Calculate the line amount for each Line Item based on quantity selected and price. • Move Line Items to a different Order if a Line Item is not in stock. Which relationship implementation supports these requirements on its own?. Line Item has a re-parentable master-detail field to Order. Line Item has a re-parentable lookup field to Order. Order has a re-parentable lookup field to Line Item. Order has a re-parentable master-detail field to Line Item. Assuming that name is a String obtained by an <apex:inputText> tag on a Visualforce page, which two SOQL queries performed are safe from SOQL injection? Choose 2 answers. String query = '%' + name + '%'; List<Account> results = [SELECT Id FROM Account WHERE Name LIKE :query];. String query = 'SELECT Id FROM Account WHERE Name LIKE \'%' + name.noQuotes () + '%\''; List<Account> results = Database.query (query);. string query = 'SELECT Id FROM Account WHERE Name LIKE \'%' + name + '%\''; List<Account> results = Database.query (query);. String query = 'SELECT Id FROM Account WHERE Name LIKE '%' + String. escapeSingleQuotes (name) + '%\''; List<Account> results = Database.query (query);. Universal Containers has implemented an order management application. Each Order can have one or more Order Line items. The Order Line object is related to the Order via a master-detail relationship. For each Order Line item, the total price is calculated by multiplying the Order Line item price with the quantity ordered. What is the best practice to get the sum of all Order Line item totals on the Order record?. Apex trigger. Roll-up summary field. Formula field. Quick action. While developing an Apex class with custom search functionality that will be launched from a Lightning Web Component, how can the developer ensure only records accessible to the currently logged in user are displayed?. Use the inherited sharing keyword. Use the with sharing keyword. Use the WITH SECURITY ENFORCED clause within the SOQL. Use the without sharing keyword. Which two characteristics are true for Lightning Web Component custom events? Choose 2 answers. Data may be passed in the payload of a custom event using @wire decorated properties. By default a custom event only propagates to its immediate container and to its immediate child component. Data may be passed in the payload of a custom event using a property called detail. . By default a custom event only propagates to it's immediate container. Where are two locations a developer can look to find information about the status of batch or future methods? Choose 2 answers. Developer Console. . Apex Jobs. Paused Flow Interviews component. Apex Flex Queue. A developer wants to import 500 Opportunity records into a sandbox. Why should the developer choose to use Data Loader instead of Data Import Wizard?. Data Loader automatically relates Opportunities to Accounts. Data Loader runs from the developer's browser. Data Import Wizard does not support Opportunities. Data Import Wizard can not import all 500 records. Which two actions may cause triggers to fire? Choose 2 answers. Changing a user's default division when the transfer division option is checked. Updates to FeedItem. Cascading delete operations. Renaming or replacing a picklist entry. Universal Containers is building a recruiting app with an Applicant object that stores information about an individual person and a Job object that represents a job. Each applicant may apply for more than one job. What should a developer implement to represent that an applicant has applied for a job?. Junction object between Applicant and Job. Lookup field from Applicant to Job. Master-detail field from Applicant to Job. Formula field on Applicant that references Job. Developers at Universal Containers (UC) use version control to share their code changes, but they notice that when they deploy their code to different environments they often have failures. They decide to set up Continuous Integration (CI). What should the UC development team use to automatically run tests as part of their CI process?. Visual Studio Code. Developer Console. Salesforce CLI. Force.com Toolkit. Managers at Universal Containers want to ensure that only decommissioned containers are able to be deleted in the system. To meet the business requirement a Salesforce developer adds "Decommissioned" as a picklist value for the Status c custom field within the Container c object. Which two approaches could a developer use to enforce only Container records with a status of "Decommissioned" can be deleted? Choose 2 answers. Apex trigger. After record-triggered flow. Before record-triggered flow. Validation rule. A team of developers is working on a source-driven project that allows them to work independently, with many different org configurations. Which type of Salesforce orgs should they use for their development?. Developer sandboxes. Developer orgs. Scratch orgs. Full Copy sandboxes. A developer needs to allow users to complete a form on an Account record that will create a record for a custom object. The form needs to display different fields depending on the user's job role. The functionality should only be available to a small group of users. Which three things should the developer do to satisfy these requirements? Choose 3 answers. Create a Custom Permission for the users. Create a Lightning web component. Add a Dynamic Action to the Account Record Page. Create a Dynamic form. Add a Dynamic Action to the Users assigned Page Layouts. A developer needs to prevent the creation of Request__c records when certain conditions exist in the system. A Request Logic class exists that checks the conditions. What is the correct implementation?. trigger RequestTrigger on Request__c (after insert) { RequestLogic.validateRecords (trigger.new); }. trigger RequestTrigger on Request (before insert) { RequestLogic.validateRecords (trigger.new); }. trigger RequestTrigger on Request (before insert) { if (Requestlogic.isValid(Request_cl) Request.addError('Your request cannot be created at this Lime."); }. trigger RequestTrigger on Request e (after insert) { if (RequestLogic.isValid(Request_c}} Request.addError('Your request cannot be created at this time.'); }. A company decides to implement a new process where every time an Opportunity is created, a follow up Task should be created and assigned to the opportunity Owner. What is the most efficient way for a developer to implement this?. Apex trigger on Task. Auto-launched flow on Task. Record-triggered flow on Opportunity. Task actions. The Account object in an organization has a master-detail relationship to a child object called Branch. The following automations exist: • Roll-up summary fields • Custom validation rules • Duplicate rules A developer created a trigger on the Account object. Which two things should the developer consider while testing the trigger code? Choose 2 answers. Rollup summary fields can cause the parent record to go through Save. Duplicate rules are executed once all DML operations commit to the database. The trigger may fire multiple times during a transaction. The validation rules will cause the trigger to fire again. A PrimaryId__c custom field exists on the Candidate__c custom object. The field is used to store each candidate's id number and is marked as Unique in the schema definition. As part of a data enrichment process, Universal Containers has a CSV file that contains updated data for all candidates in the system. The file contains each Candidate's primary id as a data point. Universal Containers wants to upload this information into Salesforce, while ensuring all data rows are correctly mapped to a candidate in the system. Which technique should the developer implement to streamline the data upload?. Upload the CSV into a custom object related to candidate c. Create a before insert trigger to correctly map the records. Update the primary defield definition to mark it as an External Id. Create a before save flow to correctly map the records. A Developer Edition org has five existing accounts. A developer wants to add 10 more accounts for testing purposes. The following code is executed in the Developer Console using the Execute Anonymous window: Account myAccount = new Account (Name = 'MyAccount'); insert myAccount; Integer x = 1: List<Account> newAccounts new List<Account>(); do { Account acct = new Account (Name = 'New Account’ + x++); newAccounts.add(acct); while (x < 10); How many total accounts will be in the org after this code is executed?. 5. 6. 10. 13. A developer must create a Lightning component that allows users to input Contact record information to create a Contact record, including a Salary__c custom field. What should the developer use, along with a lightning-record-edit-form, so that Salary_c field functions as a currency input and is only viewable and editable by users that have the correct field level permissions on Salary_c?. <lightning-input-currency value="Salary___c"> </lightning-input-currency>. <lightning-formatted-number value="Salary_o" format-style="currency"> </lightning-formatted-number>. <lightning-input-field field-name"Salary__c"> </lightning-input-field>. <lightning-input type="number" value="salary formatter "currency"> </lightning-input>. What is the result of the following code snippet? public void doWork (Account acct) { for (Integer i = 0; i <= 200; i++) { insert acct; }. 0 Accounts are inserted. 1 Account is inserted. 200 Accounts are inserted. 201 Accounts are inserted. If Apex code executes inside the execute() method of an Apex class when implementing the Batchable interface, which two statements are true regarding governor limits? Choose 2 answer. The Apex governor limits are reset for each iteration of the execute() method. The Apex governor limits cannot be exceeded due to the asynchronous nature of the transaction. The Apex governor limits will use the asynchronous limit levels. The Apex governor limits are omitted while calling the constructor of the Apex class. A developer must perform a complex SOQL query that joins two objects in a Lightning component. How can the Lightning component execute the query?. Write the query in a custom Lightning web component wrapper and invoke from the Lightning component. Invoke an Apex class with the method annotated as AuraEnabled to perform the query. Use the Salesforce Streaming API to perform the SOQL query. Create a flow to execute the query and invoke from the Lightning component. Which two operations affect the number of times a trigger can fire? Choose 2 answers. After-save record-triggered flow. Roll-up summary fields. Criteria-based sharing calculations. Email messages. Which two are best practices when it comes to Aura component and application event handling? Choose 2 answers. Try to use application events as opposed to component events. Reuse the event logic in a component bundle, by putting the logic in the helper. Use component events to communicate actions that should be handled at the application level. Handle low-level events in the event handler and re-fire them as higher-level events. What are three considerations when using the @InvocableMethod annotation in Apex? Choose 3 answers. Only one method using the @Invocablellethed annotation can be defined per Apex class. . A method using the @InvocableMethod annotation can have multiple input parameters. A method using the @invocableмethod annotation must be declared as static. A method using the @InvocableMethod annotation must define a return value. A method using the @InvocableMethod annotation can be declared as Public or Global. Which two settings must be defined in order to update a record of a junction object? Choose 2 answers. Read/Write access on the secondary relationship. Read/Write access on the primary relationship. Read/Write access on the junction object. Read access on the primary relationship. A developer wrote Apex code that calls out to an external system using REST API. How should a developer write the test to prove the code is working as intended?. Write a class that implements HTTPCalloutMock. Write a class that extends webservicelock. Write a class that implements webservicevock. Write a class that extends HTTPCalloutMock. Universal Containers wants to assess the advantages of declarative development versus programmatic customization for specific use cases in its Salesforce implementation. What are two characteristics of declarative development over programmatic customization? Choose 2 answers. Declarative development does not require Apex test classes. Declarative development has higher design limits and query limits. Declarative development can be done using the Setup menu. Declarative code logic does not require maintenance or review. How is a controller and extension specified for a custom object named "Notice" on a Visualforce page?. apex:page standardController="Notice__c" extensions="myControllerExtension". apex:page controllers="Notice__c", myControllerExtension". apex:page=Notice extends="myControllerExtension". apex:page controller="Notice c" extensions="myControllerExtension". How does the Lightning Component framework help developers implement solutions faster?. By providing an Agile process with default steps. By providing code review standards and processes. By providing change history and version control. By providing device-awareness for mobile and desktops. Universal Containers wants a list button to display a Visualforce page that allows users to edit multiple records. Which Visualforce feature supports this requirement?. Standard Controller with Custom List Controller extension. Custom List Controller with recordsetVar page attribute. Controller Extension and <apex:listButton> tag. Standard controller and the recordsetvar page attribute. A team of many developers work in their own individual orgs that have the same configuration as the production org. Which type of org is best suited for this scenario?. Developer Sandbox. . Full Sandbox. Developer Edition. Partner Developer Edition. A developer must provide custom user interfaces when users edit a Contact in either Salesforce Classic or Lightning Experience. What should the developer use to override the Contact's Edit button and provide this functionality?. A Lightning component in Salesforce Classic and a Lightning component in Lightning Experience. A Lightning page in Salesforce Classic and a Visualforce page in Lightning Experience. A Visualforce page in Salesforce Classic and a Lightning page in Lightning Experience. A Visualforce page in Salesforce Classic and a Lightning component in Lightning Experience. Which code statement includes an Apex method named updateAccounts in the class AccountController for use in a Lightning web component?. import updateAccounts from AccountController';. import updateAccounts from @salesforce/apex/AccountController'. import updateAccounts from '@salesforce/apex/AccountController.updateAccounts';. import updateAccounts from "AccountController.updateAccounts';. For which three items can a trace flag be configured? Choose 3 answers. Apex Class. Flow. User. Visualforce. Apex Trigger. Which exception type cannot be caught?. A custom exception. LimitException. NoAccessException. CalloutException. A developer creates a new Apex trigger with a helper class, and writes a test class that only exercises 95% coverage of the new Apex helper class. Change Set deployment to production fails with the test coverage warning: "Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required." What should the developer do to successfully deploy the new Apex trigger and helper class?. Increase the test class coverage on the helper class. Create a test class and methods to cover the Apex trigger. Remove the failing test methods from the test class. Run the tests using the 'Run All Tests' method. What are three capabilities of the <ltng: require> tag when loading JavaScript resources in Aura components? Choose 3 answers. One-time loading for duplicate scripts. Loading scripts in parallel. Loading files from Documents. Specifying loading order. Loading externally hosted scripts. A custom picklist field, Food_Preference__c, exists on a custom object. The picklist contains the following options: 'Vegan', 'Kosher', 'No Preference'. The developer must ensure a value is populated every time a record is created or updated. What is the optimal way to to ensure a value is selected every time a record is saved?. Set "Use the first value in the list as the default value" to True. Write an Apex trigger to ensure a value is selected. Mark the field as Required on the object's page layout. Mark the field as Required on the field definition. What are two benefits of using External IDs? Choose 2 answers. An External ID field can be used to reference an ID from another external system. An External ID is indexed and can improve the performance of SOQL queries. . An External ID can be a formula field to help create a unique key from two fields in Salesforce. An External ID can be used with Salesforce Mobile to make external data visible. What are two considerations for deploying from a sandbox to production? Choose 2 answers. Unit tests must have calls to the System.assert method. All triggers must have at least one line of test coverage. At least 75% of Apex code must be covered by unit tests. Should deploy during business hours to ensure feedback can be quickly addressed. What is the result of the following code? Account a = new Account(); Database.insert(a, false);. The record will not be created and an exception will be thrown. The record will not be created and no error will be reported. The record will be created and no error will be reported. The record will be created and a message will be in the debug log. A developer is designing a new application on the Salesforce platform and wants to ensure it can support multiple tenants effectively. Which design framework should the developer consider to ensure scalability and maintainability?. Waterfall Model. Flux (view, action, dispatcher, and store). Model-View-Controller (MVC). Agile Development. A developer at AW Computing is tasked to create the supporting test class for a programmatic customization that leverages records stored within the custom object, Pricing Structure c. AW Computing has a complex pricing structure for each item on the store, spanning more than 500 records. Which two approaches can the developer use to ensure Pricing_Structure_ c records are available when the test class is executed? Choose 2 answers. Use a Test Data Factory class. Use the @IaTeat (SeeAllData=true) annotation. Use the rest.loadTest() method. Use without sharing on the class declaration.. What occurs when more than one Account is returned by the SOQL query?. The variable, myaccount, is automatically cast to the List data type. The query fails and an error is written to the debug log. An unhandled exception is thrown and the code terminates. The first Account returned is assigned to myAccount. An org has an existing flow that edits an Opportunity with an Update Records element. A developer must update the flow to also create a Contact and store the created Contact's ID on the Opportunity. Which update must the developer make in the flow?. Add a new Get Records element. Add a new Roll Back Records element. Add a new Create Records element. Add a new Update Records element. A developer must write an Apex method that will be called from a Lightning component. The method may delete an Account stored in the accountRec variable. Which method should a developer use to ensure only users that should be able to delete Accounts can successfully perform deletions?. accountRec. isDeleteable(). accountRec.aobjectType.iaDeletable(). Schema.aobjectType.Account.isDeletable(). Account.isDeletable(). A lead developer creates an Apex interface called Laptop. Consider the following code snippet: public class SilverLaptop{ //code implementation } How can a developer use the Laptop interface within the SilverLaptop class?. Extenda (class="Laptop") public class SilverLaptop. public class SilverLaptop extends Laptop. public class silverLaptop implements Laptop. Interface (class="Laptop") public class SilverLaptop. A lead developer creates a virtual class called "OrderRequest". Consider the following code snippet: public class CustomerOrder{ //code implementation } How can a developer use the OrderRequest class within the CustomerOrder class?. public class CustomerOrder extends OrderRequest. Extends (class="OrderRequest") public class Customerörder. public class CustomerOrder implements Order. @Implements (class="OrderRequest") public class Customerörder. What should a developer use to obtain the Id and Name of all the Leads, Accounts, and Contacts that have the company name "Universal Containers"?. FIND Universal Containers' IN CompanyName Fields RETURNING lead id, name account (id, name), contact (id, name). SELECT Lead.id, Lead.Name, Account.Id, Account.Name, Contact.Id, Contact.Name FROM Lead, Account, Contact WHERE CompanyName = 'Universal Containers'. FIND 'Universal Containers' IN Name Fields RETURNING lead(id, name), account (id, name), contact (id, name). SELECT lead (id, name), account (id, name), contact (id, name) FROM Lead, Account, Contact WHERE Name = 'Universal Containers’. An Opportunity needs to have an amount rolled up from a custom object that is not in a master-detail relationship. How can this be achieved?. Write a trigger on the Opportunity object and use an aggregate function to sum the amount for all related child objects under the Opportunity. Write a trigger on the child object and use an aggregate function to sum the amount for all related child objects under the Opportunity. Use the Metadata API to create real-time roll-up summaries. Use the Streaming API to create real-time roll-up summaries. What are two considerations for running a flow in debug mode? Choose 2 answers. DML operations will be rolled back when the debugging ends. Callouts to external systems are not executed when debugging a flow. Input variables of type record cannot be passed into the flow. Clicking Pause or executing a Pause element closes the flow and ends debugging. Since Aura application events follow the traditional publish-subscribe model, which method is used to fire an event?. fire(). registerEvent(). fireEvent(). . emit(). A developer considers the following snippet of code: Boolean isOK; integer x; String theString == = 'Hello'; if (isOK == false && theString == 'Hello'){ X = 1; } else if (isOK == true && theString == 'Hello'){ x = 2; }else if (isOk != null && theString == 'Hello'){ x = 3; } else { x = 4; }. 1. 3. 4. 2. What does the Lightning Component framework provide to developers?. Prebuilt components that can be reused. Extended governor limits for applications. Support for Classic and Lightning UIs. Templates to create custom components. Universal Containers wants to automatically assign new cases to the appropriate support representative based on the case origin. They have created a custom field on the Case object to store the support representative name. What is the best solution to assign the case to the appropriate support representative?. . Use a validation rule on the Case object. Use a formula field on the Case object. Use an Assignment Flow element. Use a trigger on the Case object. What are three ways for a developer to execute tests in an org? Choose 3 answers. Salesforce DX. Bulk API. Setup Menu. Tooling API. Metadata API. When importing and exporting data into Salesforce, which two statements are true? Choose 2 answers. Bulk API can be used to import large data volumes in development environments without bypassing the storage limits. Bulk API can be used to bypass the storage limits when importing large data volumes in development environments. Developer and Developer Pro sandboxes have different storage limits. Data import wizard is an application that is installed on your computer. A developer must implement a CheckPayment Processor class that provides check processing payment capabilities that adhere to what is defined for payments in the Payment Processor interface. public interface PaymentProcessor { void pay (Decimal amount); } Which implementation is correct to use the Payment Processor interface class?. A. public class CheckPaymentProcessor implements PaymentProcessor | public void pay(Decimal amount); }. public class CheckPayment Processor extends PaymentProcessor { public void pay Decimal amount) { // functional code here } }. public class CheckPaymentProcessor implements PaymentProcessor { public void pay (Decimal amount) // functional code here } }. public class CheckPaymentProcessor extends PaymentProcessor { public void pay (Decimal amount); }. Universal Containers decides to use exclusively declarative development to build out a new Salesforce application. Which three options should be used to build out the database layer for the application? Choose 3 answers. Custom objects and fields. Triggers. Roll-up summaries. Relationships. Flows. A developer wants to send an outbound message when a record meets a specific criteria. Which two features satisfy this use case? Choose 2 answers. Entitlement Process can be used to check the record criteria and send an outbound message without Apex code. Approval Process can be used to check the record criteria and send an outbound message without Apex code. Next Best Action can be used to check the record criteria and send an outbound message. Approval Process can be used to check the record criteria and send an outbound message without Apex code. A developer creates a Lightning web component that imports a method within an Apex class. When a Validate button is pressed, the method runs to execute complex validations. In this implementation scenario, which two options are part of the Controller according to the MVC architecture? Choose 2 answers. JavaScript file. Apex class. XML file. HTML file. A developer created a trigger on the Account object. While testing the trigger, the developer sees the error message 'Maximum trigger depth exceeded. What could be the possible causes?. The developer does not have the correct user permission. The trigger is getting executed multiple times. The trigger is too long and should be refactored into a helper class. The trigger does not have sufficient code coverage. What are three characteristics of change set deployments? Choose 3 answers. Change sets can only be used between related organizations. Deployment is done in a one-way, single transaction. Change sets can be used to transfer records. Sending a change set between two orgs requires a deployment connection. Change sets can deploy custom settings data. A development team wants to use a deployment script to automatically deploy to a sandbox during their development cycles. Which two tools can they use to run a script that deploys to a sandbox? Choose 2 answers. SFDX CLI. Developer Console. Ant Migration Tool. Change Sets. Universal Containers hires a developer to build a custom search page to help users find the Accounts they want. Users will be able to search on Name, Description, and a custom comments field. Which consideration should the developer be aware of when deciding between SOQL and SOSL? Choose 2 answers. SOQL is faster for text searches. SOSL is faster for text searches. SOSL is able to return more records. SOQL is able to return more records. A developer completed modifications to a customized feature that is comprised of two elements: Apex trigger Trigger handler Apex class What are two factors that the developer must take into account to properly deploy the modification to the production environment? Choose 2 answers. At least one line of code must be executed for the Apex trigger. All methods in the test classes must use @isTest. Test methods must be declared with the testMethod keyword. Apex classes must have at least 75% code coverage org-wide. A developer creates a batch Apex job to update a large number of records, and receives reports of the job timing out and not completing. What is the first step towards troubleshooting the issue?. Check the asynchronous job monitoring page to view the job status and logs. Check the debug logs for the batch job. Decrease the batch size to reduce the load on the system. Disable the batch job and recreate it with a smaller number of records. A developer created these three Rollup Summary fields in the custom object, project c: Total Timesheets_ c Total Approved _Timesheets_ c Total Rejected Timesheet _c The developer is asked to create a new field that shows the ratio between rejected and approved timesheets for a given project. Which should the developer use to implement the business requirement in order to minimize maintenance overhead?. Formula field. Roll-up summary field. Apex trigger. Record-triggered flow. Universal Containers recently transitioned from Classic to Lightning Experience. One of its business processes requires certain values from the Opportunity object to be sent via an HTTP REST callout to its external order management system when the user presses a custom button on the Opportunity detail page. Example values are as follows: « Name « Amount « Account Which two methods should the developer implement to fulfill the business requirement? Choose 2 answers. Create an after update trigger on the Opportunity object that calls a helper method using @Future (Callout=true) to perform the HTTP REST callout. Create a custom Visualforce quick action that performs the HTTP REST callout, and use a Visualforce quick action to expose the component on the Opportunity detail page. Create a Remote Action on the Opportunity object that executes an Apex immediate action to perform the HTTP REST callout whenever the Opportunity is updated. Create a Lightning component quick action that performs the HTTP REST callout, and use a Lightning Action to expose the component on the Opportunity detail page. Which annotation should a developer use on an Apex method to make it available to be wired to a property in a Lightning web component?. @RemoteAction. @AuraEnabled. @AuraEnabled(cacheable=true). @RemoteAction(cacheable=true). A developer is tasked with building a custom Lightning web component to collect Contact information. The form will be shared among many different types of users in the org. There are security requirements that only certain fields should be edited and viewed by certain groups of users. What should the developer use in their Lightning Web Component to support the security requirements?. force-input-field. ui-input-field. aura-input-field. lightning-input-field. Universal Containers (UC) uses out-of-the-box order management, that has a Master-Detail relationship between Order and Order Line Item. UC stores the availability date on each Order Line Item and Orders are only shipped when all of the Order Line Items are available. Which method should be used to calculate the estimated ship date for an Order?. Use a CEILING formula on each of the latest availability date fields. Use a LATEST formula on each of the latest availability date fields. Use a DAYS formula on each of the availability date fields and a COUNT Roll-Up Summary field on the Order. Use a MAX Roll-Up Summary field on the latest availability date fields. A developer needs to have records with specific field values in order to test a new Apex class. What should the developer do to ensure the data is available to the test?. Use SOQL to query the org for the required data. Use Test.loadData() and reference a CSV file in a static resource. Use Anonymous Apex to create the required data. Use Teat.loadData() and reference a JSON file in Documents. In terms of the MVC paradigm, what are two advantages of implementing the view layer of a Salesforce application using Lightning Web Component-based development over Visualforce? Choose 2 answers. Log capturing via the Debug Logs Setup page. Built-in standard and custom set controllers. Self-contained and reusable units of an application. Rich component ecosystem. How can a developer check the test coverage of autolaunched Flows before deploying them in a change set?. Use SOQL and the Tooling APL. Use the Code Coverage Setup page. Use the ApexTestResult class. Use the Flow Properties page. Which code displays the contents of a Visualforce page as a PDF?. <apex:page contentType="pdf">. <apex:page contentType="application/pdf">. <apex:page renderAs="pdf">. <apex:page renderAs="gpplication/pdf">. While writing an Apex class, a developer wants to make sure that all functionality being developed is handled as specified by the requirements. Which approach should the developer use to be sure that the Apex class is working according to specifications?. Include a try/catch block to the Apex class. Include a savepoint and Datarase.rollback(). Create a test class to execute the business logic and run the test in the Developer Console. Run the code in an Execute Anonymous block in the Developer Console. Which statement generates a list of Leads and Contacts that have a field with the phrase 'ACME'?. List<List <=sObject>> searchlist = [SELECT Name, ID FROM Contact, Lead WHERE Name like ‘%ACME%']:. List<List <sObject>> searchList = [FIND '*ACME*' IN ALL FIELDS RETURNING Contact, Lead];. Map <s0bject> searchlList = [FIND '*ACME*' IN ALL FIELDS RETURNING Contact, Lead]:. List <sObject> searchlist = [FIND '*ACME*' IN ALL FIELDS RETURNING Contact, Lead]:. Universal Containers has an order system that uses an Order Number to identify an order for customers and service agents. Order records will be imported into Salesforce. How should the Order Number field be defined in Salesforce?. Indirect Lookup. External ID and Unique. Lookup. Direct Lookup. Universal Containers wants Opportunities to no longer be editable when it reaches the Closed/Won stage. Which two strategies can a developer use to accomplish this? Choose 2 answers. Use a validation rule. Use an auto-response rule. Use a before-save Apex trigger. Use an automatically launched Approval Process. A developer created a child Lightning web component nested inside a parent Lightning web component. The parent component needs to pass a string value to the child component. In which two ways can this be accomplished? Choose 2 answers. The parent component can invoke a public method in the child component. The parent component can use a public property to pass the data to the child component. The parent component can use a custom event to pass the data to the child component. The parent component can use the Apex controller class to send data to the child component. A developer deployed a trigger to update the status__c of Assets related to an Account when the Accounts status changes and a nightly integration that updates Accounts in bulk has started to fail with limit failures. 01: trigger AccountTrigger on Account (after update) { 02: List<Asset> assetsToUpdate = new List<Asset>(); 03: for (Account newA : Trigger.new) { 04: Account oldA = Trigger.oldMap.get (newA.Id): 05: if (oldA.Status__c != newA.Status__c) { 06: assetsToUpdate.addAll ( AccountHelper.getAssetsToUpdate (newA) ); 07: } 08: } 09: update assetsToUpdate; 10: } 11: public class AccountHelper { 19: public static List<Asset> getAssetsToUpdate (Account acct) { 13: List<Asset> assetsToUpdate = new List<Asset>(); 16: for (assets asst : SELECT Id, Status__c FROM Asset 18: WHERE AccountId = :acect.Id]){ 19: if (asst.Status__c != acet.Status__c) { 20: asst.Status__c = acct.Status__ cy 21: assetsToUpdate.add (asst); 22; } 23: } 24: return assetsToUpdate; 25: } 26: } What should the developer change about the code to address the failure while still having the code update all of the Assets correctly?. Change the getAssetsToUpdate method to process all Accounts in one call and call it outside of the for loop that starts on line 03. . Add a LIMIT clause to the SOQL query on line 16 to limit the number of Assets queried for an Account. Move all of the logic to a Queueable class that queries for and updates the Assets and call it from the trigger. Add List<Asset> assets = [SELECT Id, Status_c FROM Asset WHERE Accountld = :acctld] to line 14 and iterate over the assets list in the fox loop on line 15. BE Mark this item for later review. A developer is migrating a Visualforce page into a Lightning web component. The Visualforce page shows information about a single record. The developer decides to use Lightning Data Service to access record data. Which security consideration should the developer be aware of?. The isAccessible() method must be used for field-level access checks. The with sharing keyword must be used to enforce sharing rules. . Lightning Data Service handles sharing rules and field-level security. Lightning Data Service ignores field-level security. When using Salesforce DX, what does a developer need to enable to create and manage scratch orgs?. Production. Dev Hub. Sandbox. Environment Hub. What are two use cases for executing Anonymous Apex code? Choose 2 answers. To add unit test code coverage to an org. To delete 15,000 inactive Accounts in a single transaction after a deployment. To schedule an Apex class to run periodically. To run a batch Apex class to update all Contacts. A developer must create a DrawList class that provides capabilities defined in the sortable and Drawable interfaces. public interface Sortable { void sort(); } public interface Drawable { void drawl(); } What is a considerations for running a flow in debug mode?. Callouts to external systems are not executed when debugging a flow. When debugging a schedule-triggered flow, the flow starts only for one record. Clicking Pause allows an element to be replaced in the flow. DML operations will be rolled back when the debugging ends. Which code in a Visualforce page and/or controller might present a security vulnerability?. <apex:outputfield value="{!ctrl.userInput) rendered="{!:isEditable} />. <apex:outputText escape="false" value="{!$CurrentPage.parameters.userlnput}" />. <apex:outputField value="{!ctrl.userInput}" />. <apex:outputText value="{!$CurrentPage.parameters.userlnput} />. What are two benefits of using declarative customizations over code?. Declarative customizations generally require less maintenance. Declarative customizations automatically generate test classes. . Declarative customizations automatically update with each Salesforce release. Declarative customizations cannot generate run time errors. A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violations to the user. How can the developer make sure that validation rule violations are displayed?. Include <apex:message=> on the Visualforce page. Usea try/catch with a custom exception class. Perform the DML using the Database.upsert () method. Add custom controller attributes to display the message. A developer has an integer variable called maxattempts. The developer needs to ensure that once maxattempts is initialized, it preserves its value for the length of the Apex transaction; while being able to share the variable's state between trigger executions. How should the developer declare maxattempts to meet these requirements?. Declare maxAttempts as a variable on a helper class. Declare maxAttempts as a constant using the static and final keywords. Declare maxAttempts as a private static variable on a helper class. Declare maxAttempt= as a member variable on the trigger definition. A developer is creating a Lightning web component to show a list of sales records. The Sales Representative user should be able to see the commission field on each record. The Sales Assistant user should be able to see all fields on the record except the commission field. How should this be enforced so that the component works for both users without showing any errors?. Use Lightning Data Service to get the collection of sales records. Use Security.stripInaccessible to remove fields inaccessible to the current user. Use WITE SECURITY ENFORCED in the SOQL that fetches the data for the component. Use Lightning Locker Service to enforce sharing rules and field-level security. A developer identifies the following triggers on the Expense c object: deletsExpense, applyDefaultsToExpense, validateExpenseUpdate; The triggers process before delete, before insert, and before update events respectively. Which two techniques should the developer implement to ensure trigger best practices are followed? Choose 2 answers. Create helper classes to execute the appropriate logic when a record is saved. Unify the before insert and before update triggers and use Flow for the delete action. Unify all three triggers in a single trigger on the Expens=__c object that includes all events. Maintain all three triggers on the Expense__c object, but move the Apex logic out of the trigger definition. Universal Hiring uses Salesforce to capture job applications. A salesforce administrator created two custom objects; Job_c acting as the maste object, Job_application__cc acting as the detail. Within the Job__c object, a custom multi-select picklist, preferred Locations __c, contains a list of approved states for the position. Each Job_Application__c record relates to a Contact within the system through a master-detail relationship. Recruiters have requested the ability to view whether the Contact's Mailing State value matches a value selected on the preferred_Locations__c field, within the Job_application__c record. Recruiters would like this value to be kept in sync if changes occur to the Contact's Mailing State. What is the recommended tool a developer should use to meet the business requirement?. Roll-up summary field. . Apex trigger. Formula field. Record-triggered flow. Which three Salesforce resources can be accessed from a Lightning web component? Choose 3 answers. SVG resources. Third-party web components. All external libraries. Content asset files. Static resources. Universal Containers (UC) processes orders in Salesforce in a custom object, Order c. They also allow sales reps to upload CSV files with thousands of orders at a time. A developer is tasked with integrating orders placed in Salesforce with UC's enterprise resource planning (ERP) system. After the status for an Order__cc is first set to 'Placed', the order information must be sent to a REST endpoint in the ERP system that can process one order at a time. What should the developer implement to accomplish this?. Callout from a Queueable class called from a trigger. Callout from a Batchable class called from a scheduled job. Flow with a callout from an invocable method. Callout from an @future method called from a trigger. When a user edits the Postal Code on an Account, a custom Account text field named "Timezone" must be updated based on the values in a PostalCodeToTimezone c custom object. Which two automation tools can be used to implement this feature? Choose 2 answers. Quick actions. Approval process. Fast Field Updates record-triggered flow. Account trigger. A developer needs to implement a custom SOAP Web Service that is used by an external Web Application. The developer chooses to include helper methods that are not used by the Web Application in the implementation of the Web Service Class. Which code segment shows the correct declaration of the class and methods?. global class WebServiceClass { private static Boolean helperMethod() { /* implementation */ } global String updateRecords () { /* implementation */ } }. webservice class WebServiceClass { private static Boolean helperMethod () { /* implementation */ } global static String updateRecords () { /* implementation */ } }. webservice class WebServiceClass { private static Boolean helperMethod () { /* implementation */ } webservice static String updateRecords () { /* implementation */ } }. . global class WebServiceClass { private static Boolean helperMethod () { /* implementation / }. The value of the account type field is not being displayed correctly on the page. Assuming the custom controller is properly referenced on the Visualforce page, what should the developer do to correct the problem?. Add a getter method for the actType attribute. Change theAccount attribute to public. Add with sharing to the custom controller. Convert theAccount. Type to a String. A developer needs to make a custom Lightning Web Component available in the Salesforce Classic user interface. Which approach can be used to accomplish this?. Embed the Lightning Web Component is a Visualforce Component and add directly to the page layout. Use the Lightning Out JavaScript library to embed the Lightning Web Component in a Visualforce page and add to the page layout. Wrap the Lightning Web Component in an Aura Component and surface the Aura Component as a Visualforce tab. Use a Visualforce page with a custom controller to invoke the Lightning Web Component using a call to an Apex method. What can be used to override the Account's standard Edit button for Lightning Experience?. Lightning page. Lightning action. Lightning flow. Lightning component. The developer creates a test class with a test method that calls MyClass.myStaticMethod directly, resulting in 81% overall code coverage. What happens when the developer tries to deploy the trigger and two classes to production, assuming no other code exists?. The deployment passes because both classes and the trigger were included in the deployment. The deployment fails because no assertions were made in the test method. The deployment passes because the Apex code has the required >75% code coverage. The deployment fails because the Apex trigger has no code coverage. A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of Apex tests allowing them to test isolated requirements for various types of Salesforce cases. Which approach can efficiently generate the required data for each unit test?. Create a mock using the HttpCalloutMock interface. Use @TestSetup with a void method. Add @IsTest (seeAllData=true) at the start of the unit test class. Create test data before Test.startTest() in the unit test. A company has a custom object, Order c, that has a required, unique external ID field called Order Number C. Which statement should be used to perform the DML necessary to insert new records and update existing records in a list of Order using the external ID field?. merge orders;. merge orders Order_Number__c. upsert orders;. upsert orders Order_Number__c. A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of tests allowing them to test independent requirements for various types of Salesforce Cases. Which approach can efficiently generate the required data for each unit test?. Create a mock using the Stub API. Create test data before Test.startTest() in the unit test. Use @TestSetup with a void method. Add @IsTest (seeAllData=true) at the start of the unit test class. Which Lightning Web Component custom event property settings enable the event to bubble up the containment hierarchy and cross the Shadow DOM boundary?. bubbles: true, composed: false. bubbles: false, composed: false. bubbles: true, composed: true. bubbles: false, composed: true. Universal Containers needs to create a custom user interface component that allows users to enter information about their accounts. The component should be able to validate the user input before saving the information to the database. What is the best technology to create this component?. Lightning Web Components. Flow. VUE JavaScript framework. Visualforce. How should a developer write unit tests for a private method in an Apex class?. Use the SeeAllData annotation. Add a test method in the Apex class. Mark the Apex class as global. Use the @TestVisible annotation. What can be easily developed using the Lightning Component framework?. Salesforce Classic user interface pages. Lightning Pages. Customized JavaScript buttons. Salesforce integrations. While working in a sandbox, an Apex test fails when run in the Test Runner. However, executing the Apex logic in the Execute Anonymous window succeeds with no exceptions or errors. Why did the method fail in the sandbox test framework but succeed in the Developer Console?. The test method does not use system.runAs to execute as a specific user. The test method is calling an @future method. The test method relies on existing data in the sandbox. The test method has a syntax error in the code. How many Accounts will be inserted by the following block of code? for (Integer i = 0; i < 500; i++) { Account a = new Account (Name='New Account + i); insert a; }. 100. 0. 150. 500. Cloud Kicks has a multi-screen flow that its call center agents use when handling inbound service desk calls. At one of the steps in the flow, the agents should be presented with a list of order numbers and dates that are retrieved from an external order management system in real time and displayed on the screen. What should a developer use to satisfy this requirement?. An outbound message. An Apex REST class. An Apex controller. An invocable method. A lead developer creates a virtual class called "OrderRequest". Consider the following code snippet: public class CustomerOrder { //code implementation } How can a developer use the OrderRequest class within the CustomerOrder class?. @Extends (class="Order Request") public class CustomerOrder. public class Customer Order implements Order. public class Customer order extends OrderRequest. @Implements (class="OrderRequest") public class Customerorder. What is the value of the Trigger.old context variable in a before insert trigger?. An empty list of sObjects. Undefined. null. A list of newly created sObjects without IDs. public static void insertAccounts (List<Account> theseAccounts) { for (Account thisAccount : theseAccounts) { if (thisAccount.website == null) { thisAccount.website = 'https://www.demo.com'; } } update theseAccounts; } When the code executes, a DML exception is thrown. How should a developer modify the code to ensure exceptions are handled gracefully?. Implement the upsert DML statement. Implement Change Data Capture. Implement a try/catch block for the DML. Remove null items from the list of Accounts. A Next Best Action strategy uses an Enhance element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors. What is the correct definition of the Apex method?. @InvocableMethod global List<List<Recommendation>> getLevel (List<ContactWrapper> input) { /*implementation*/ }. @InvocableMethod global Recommendation getLevel (ContactWrapper input) { /*implementation*/ }. @InvocableMethod global static ListRecommendation getLevel (List<ContactWrapper> input) { /*implementation*/ }. @InvocableMethod global static List<List<Recommendation>> getLevel (List<ContactWrapper> input). Universal Containers decided to transition from Classic to Lightning Experience. They asked a developer to replace a JavaScript button that was being used to create records with prepopulated values. What can the developer use to accomplish this?. Record triggered flows. Quick Actions. Apex triggers. Validation rules. Universal Containers has developed custom Apex code and Lightning Components in a Sandbox environment. They need to deploy the code and associated configurations to the Production environment. What is the recommended process for deploying the code and configurations to Production?. Use the Force.com IDE to deploy the Apex code and Lightning Components. Use the Ant Migration Tool to deploy the Apex code and Lightning Components. Use a change set to deploy the Apex code and Lightning Components. Use Salesforce CLI to deploy the Apex code and Lightning Components. In the following example, which sharing context will myMethod execute when it is invoked? public Class myClass { public void myMethod () { /* implementation */ } }. Sharing rules will be enforced by the instantiating class. Sharing rules will be enforced for the running user. Sharing rules will not be enforced for the running user. Sharing rules will be inherited from the calling context. Universal Containers has a Visualforce page that displays a table of every Container_ c being rented by a given Account. Recently this page is failing with a view state limit because some of the customers rent over 10,000 containers. What should a developer change about the Visualforce page to help with the page load errors?. Implement pagination with an OffsetController. Implement pagination with a StandardSetController. Use JavaScript remoting with SOQL Offset. Use lazy loading and a transient List variable. Universal Containers decides to use purely declarative development to build out a new Salesforce application. Which two options can be used to build out the business logic layer for this application? Choose 2 answers. Record-Triggered Flow. Batch Jobs. Remote Actions. Validation Rules. A custom object Trainer___c has a lookup field to another custom object Gym__c Which SOQL query will get the record for the Viridian City Gym and all it's trainers?. SELECT ID FROM Trainer C WHERE Gym r.Name = 'Viridian City Gym'. SELECT Id, (SELECT Id FROM Trainer_c) FROM Gym__cC WHERE Name = 'Viridian City Gym'. SELECT Id, (SELECT Id FROM Trainers r) FROM Gym__c WHERE Name = 'Viridian City Gym'. SELECT Id, (SELECT Id FROM Trainers FROM Gym__c WHERE Name = 'Viridian City Gym'. Which three resources in an Aura component can contain JavaScript functions? Choose 3 answers. Style. Renderer. Controller. Design. Helper. A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an OrderItem object that has a master-detail relationship to Order. During order processing, an order may be split into multiple orders. What should a developer do to allow their code to move some existing OrderItem records to a new Order record?. Add without sharing to the Apex class declaration. Change the master-detail relationship to an external lookup relationship. Select the Allow reparenting option on the master-detail relationship. Create a junction object between OrderItem and Order. Which three statements are accurate about debug logs? Choose 3 answers. Debug logs can be set for specific users, classes, and triggers. System debug logs are retained for 24 hours. Only the 20 most recent debug logs for a user are kept. Debug log levels are cumulative, where FINE log level includes all events logged at the DEBUG, INFO, WARN, and ERROR levels. The maximum size of a debug log is 5 MB. A developer created a trigger on a custom object. This custom object also has some dependent pick lists. According to the order of execution rules, which step happens first?. The original record is loaded from the database. System validation is run for maximum field lengths. JavaScript validation is run in the browser. Old values are overwritten with the new record values. Universal Containers implemented a private sharing model for the Account object. A custom Account search tool was developed with Apex to help sales representatives find accounts that match multiple criteria they specify. Since its release, users of the tool report they can see Accounts they do not own. What should the developer use to enforce sharing permissions for the currently logged in user while using the custom search tool?. Use the with sharing keyword on the class declaration. Use the without sharing keyword on the class declaration. Use the UserInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user. Use the schema describe calls to determine if the logged-in user has access to the Account object. Universal Containers has a support process that allows users to request support from its engineering team using a custom object, Engineering_Support_c. Users should be able to associate multiple Engineering_Support_ c records to a single Opportunity record. Additionally, aggregate information about the Engineering_Support c records should be shown on the Opportunity record. Which relationship field should be implemented to support these requirements?. Lookup field from Opportunity to Engineering_Support__c. Master-detail field from Engineering_Support__c to Opportunity. Master-detail field from Opportunity to Engineering_Support__c. Lookup field from Engineering_Support__c to Opportunity. A developer is creating an app that contains multiple Lightning web components. One of the child components is used for navigation purposes. When a user clicks a button called Next in the child component, the parent component must be alerted so it can navigate to the next page. How should this be accomplished?. Update a property on the parent. Create a custom event. Call a method in the Apex controller. Fire a notification. Which annotation exposes an Apex class as a RESTful web service?. @RemoteAction. @HttpInvocable. @RestResource (urlMapping='/myService/*'). @AuraEnabled (cacheable=true). A developer is implementing an Apex class for a financial system. Within the class, the variables 'creditAmount' and 'debitAmount' should not be able to change once a value is assigned. In which two ways can the developer declare the variables to ensure their value can only be assigned one time? Choose 2 answers. Use the static keyword and assign its value in a static initializer. Use the final keyword and assign its value in the class constructor. Use the final keyword and assign its value when declaring the variable. Use the static keyword and assign its value in the class constructor. Which scenario is valid for execution by unit tests?. Execute anonymous Apex as a different user. Generate a Visualforce PDF with getContentAs PDF (). Set the created date of a record using a system method. Load data from a remote site with a callout. A developer is asked to prevent anyone other than a user with Sales Manager profile from changing the Opportunity Status to Closed Lost if the lost reason is blank. Which automation allows the developer to satisfy this requirement in the most efficient manner?. An Apex trigger on the Opportunity object. An error condition formula on a validation rule on Opportunity. A record trigger flow on the Opportunity object. An approval process on the Opportunity object. A developer created a trigger on the Account object and wants to test if the trigger is properly bulkified. The developer team decided that the trigger should be tested with 200 account records with unique names. What two things should be done to create the test data within the unit test with the least amount of code? Choose 2 answers. Create a static resource containing test data. Use Test.loadData to populate data in your test methods. Use the @isTest (seeAllData=true) annotation in the test class. Use the @isTest (isParallel=true) annotation in the test class. A business has a proprietary Order Management System (OMS) that creates orders from its website and fulfills the orders. When the order is created in the OMS, an integration also creates an order record in Salesforce and relates it to the contact as identified by the email on the order. As the order goes through different stages in the OMS, the integration also updates it in Salesforce. The business notices that each update from the OMS creates a new order record in Salesforce. Which two actions should prevent the duplicate order records from being created in Salesforce? Choose 2 answers. Use the email on the contact record as an external ID. Use the order number from the OMS as an external ID. Ensure that the order number in the OMS is unique. Write a trigger on the Order object to delete the duplicates. Which three data types can a SOQL query return? Choose 3 answers. Double. Integer. sObject. Long. List. A developer created a new after insert trigger on the Lead object that creates Task records for each Lead. After deploying to production, an existing outside integration that inserts Lead records in batches to Salesforce is occasionally reporting total batch failures being caused by the Task insert statement. This causes the integration process in the outside system to stop, requiring a manual restart. Which change should the developer make to allow the integration to continue when some records in a batch cause failures due to the Task insert statement, so that manual restarts are not needed?. Deactivate the trigger before the integration runs. Use the Database method with allorNone set to false. Remove the Apex class from the integration user's profile. Use a try-catch block after the insert statement. Which two statements are true about using the @testSetup annotation in an Apex test class? Choose 2 answers. Records created in the test setup method cannot be updated in individual test methods. In a test setup method, test data is inserted once and made available for all test methods in the test class. A method defined with the @testSetup annotation executes once for each test method in the test class and counts towards system limits. The @testSetup annotation is not supported when the @isTest(SeeAllData=True) annotation is used. |