TEST II 9bb9f8f4-b746-45e5-9343-71776be4f127
![]() |
![]() |
![]() |
Título del Test:![]() TEST II 9bb9f8f4-b746-45e5-9343-71776be4f127 Descripción: TEST I DEV |




Comentarios |
---|
NO HAY REGISTROS |
Since Aura application events follow the traditional publish-subscribe model, which method |s used to fire an event?. registerEvent(). emit(). fireEvent(). fire(). 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 has a large number of custom applications that were bullt using a third-party JavaScript framework and exposed using Visualforce pages. The company wants to update these applications to apply styling that resembles the look and feel of Lightning Experience. What should the developer do to fulfill the business request in the quickest and most effective manner?. Enable Available for Lightning Experience, Lightning Communities, and the mobile app on Visualforce pages used by the custom application. Set the attribute enableLightning to true in the definition,. Incorporate the Salesforce Lightning Design System CSS stylesheet into the JavaScript applications. Rewrite all Visualforce pages as Lightning components. 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 F zone__c custom object Which two automation tools can be used to implement this featur Choose 2 answers. Fast Field Updates record-triggered flow. Approval process. Quick actions. Account trigger. A developer Is Integrating with a legacy on-premise SQL database. What should the developer use to ensure the data being integrated is matched to the right records in Salesforce?. External Object. External ID field. Formula field. Lookup field. For which three Items can a trace flag be configured? Choose 3 answers. Flow. Apex Trigger. Apex Class. User. Visualforce. Which three resources in an Aura component can contain JavaScript functions? Choose 3 answers. Design. Helper. Controller. Style. Renderer. While working in a sandbox, an Apex test falls when run in the Test Framwork. However, running the Apex test 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 is calling an @futuremethod. The test method does not use System.runAs to execute as a specific user. The test method relies on existing data in the sandbox. The test method has a syntax error in the code. 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 final keyword and assign its value when declaring the variable. 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 static keyword and assign its value in the class constructor. Which Apex technique should the developer use?. A switch statement, with a for loop inside. An if-else statement, with a for loop inside. A for loop, with an if-else statement inside. A for loop, with a switch statement inside. An org has an existing flow that creates 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 Roll Back Records element. Add a new Update Records element. Add a new Get Records element. Add a new Create Records element. A developer wrote an Apex method to update a list of Contacts and wants to make it available for use by Lightning web components. Which annotation should the developer add to the Apex method to achieve this?. @AuraEnabled (cacheable=true). @RemoteAction. @RemoteAction (cacheable=true). @AuraEnabled. Which three code lines are required to create a Lightning component on a Visualforce page? Choose 3 answers. $Lightning.UseComponent. <apex:slds/>. <apex:includeLightning/>. $Lightning.CreateComponent. $Lightning.use. 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?. Use JavaScript remoting with SOQL Offset. Implement pagination with a StanderdSetController. Implement pagination with an OffsetController. Use lazy loading and a transient List variable. When using Salesforce DX, what does a developer need to enable to create and manage scratch orgs?. Production. Sandbox. Enviroment Hub. Dev Hub. What are three capabilities of the <ltng:require> tag when loading JavaScript resources in Aura components? Choose 3 answers. Specifying loading order. Loading scripts in parallel. Loading externally hosted scripts. Loading files from Documents. One-time loading for duplicate scripts. 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. Quick action. Formula field. Roll-up summary field. 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 the @isTest (isParallel=true) annotation in the test class. Use Test.loadData to populate data in your test methods. Use the @isTest(seeAllData = true) annotation in the test class. What Is the result of the following code? Account a = new Account(); Database.insert(a, false);. The record will be created and a message will be in the debug log. 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 not be created and an exception will be thrown. What are three considerations when using the @ annotation in Apex? Choose 3 answers: A method using the @InvocableMethod annotation can be declared as Public or Global. A method using the @InvocableMethod annotation must define a return value. A method using the @InvocableMethod annotation must be declared as static. Only one method using the @InvocableMethod annotation can be defined per Apex class. A method using the @InvocableMethod annotation can have multiple Input parameters. A company has a custom object, Sales_Help_Request__c, that has @ Lookup relationship to Opportunity. The Sales_Help_Request_c has a number field, Nunber_of_Hours_c, that represents the amount of time spent on the sales_Help_Resquest__c. A developer Is tasked with creating a field, Total_Hours__c, on Opportunity that should be the sum of all of the Number_of_Hours values for the Sales_Help_Request_c records related to that Opportunity. What should the developer use to implement this?. A trigger on the Opportunity object. A roll-up summary fleld on the Opportunity object. A record-triggered flow on the Sales_Help_Request__c object. A roll-up summary field on the Sales_Help_Request__c object. What are three ways for a developer to execute tests in an org? Choose 3 answers. Metadata API. Selestorce DX. Bulk API. Setup Menu. Tooling API. Given the following Anonymous block: What should developer consider for an environment that has over 10,000 Case records?. The try-catch block will handle any DML exceptions thrown. The transaction will fall due to exceeding the governor limit. The try-cateh block will handle exceptions thrown by governor limits. 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__c Is first set to ‘Placed’, the order information must be sent to REST endpoint in the ERP system that can process one order at a time. What should the developer implement to accomplish this?. Flow with a callout from an invocable method. Callout from an @future method called from a trigger. Callout from a Batchable class called from a scheduled job. Callout from a Queueable class called from a trigger. When importing and exporting data into Salesforce, which two statements are true? Choose 2 answers. Developer and Developer Pro sandboxes have different storage limits. Deta import wizarg. is an application that is installed on your computer. Bulk API can be used to bypass the storage limits when importing large data volumes in development environments. Bulk API can be used to import large data volumes in development environments without bypassing the storage limits. Refer to the following code snippet, that is part of a custom controller for a Visualforce page: In which two ways can the try/catch be enclosed to enforce object and fleld-level permissions and prevent the DML statement from being executed if the current logged-in user does not have the appropriate level of access? Choose 2 answers. Use if (Scheme. sobjeceType.Cotnact.isAccessibie()}. Use if(thisContact.OwnerId == UserInfo.getUserId()}. Use if (Scheme. sobjeceType.Cotnact.isUpdateable()}. Use if (Scheme. sobjeceType.Cotnact.fields.Is_Active__c.isUpdateable()}. A developer wants to get access to the standard price book In the org while writing a test class that covers an OpportunityLineltem trigger. Which method allows access to the price book?. Use Test.loadData() and a static resource to load a standard price book. Use Test.getStandarPricebookId() to get the standard price book ID. Use @IsTest (SeeAllData=true) and delete the existing standard price book,. Use @TestVisible to allow the test method to see the standard price book. 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 'AccountController.updateAccounts';. import updateAccounts from '@salesforce/apex/AccountController';. import updateAccounts from '@salesforce/apex/AccountController.updateAccounts';. Which two statements are true about using the @testSetup annotation In an Apex test class? Choose 2 answers: Records created in the fest setup method cannot be updated in individual test methods. The @testSetup annotation is not supported when the @isTest(SeeAllData=True) annotation is used. 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. Which three statements are true regarding custom exceptions In Apex? Choose 3 answers: A custom exception class must extend the system Exception class. A custom exception class name must end with “Exception”. A custom exception class cannot contain member variables or methods. A custom exception class can extend other classes besides the Exception class. A custom exception class can implement one or many interfaces. Universal Containers (UC) Is developing a process for their sales teams that requires all sales reps to go through a set of scripted steps with each new customer they create. n the first step of collecting information, UC's ERP system must be checked via a REST endpoint to see if the customer exists. If the customer exists, the data must be presented to the sales rep in Salesforce. Which two should a developer implement to satisfy the requirements? Choose 2 answers. Flow. Incocable method. Trigger. Future method. AW Computing tracks order Information in custom objects called Order__c and Order_Line__c. Currently, all shipping information is stored in the Order__c object. The company wants to expand its order application to support spilt shipments so that any number of Order_Line__c records on a single Order__c can be shipped to different locations. What should a developer add to fulfill this requirement?. Order_Shipment_Group__c object and master-detail filed on Order__c. Order_Shipment_Group__c object and master-detail filed on Order_Line__c. Order_Shipment_Group__c object and master-detail filed on Order_Shipment_Group__c. Order_Shipment_Group__c object and master-detail fileds to Order__c and Order_Line__c. 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?. Call a method In the Apex controller. Fire a notification. Update a property on the parent. Create a custom event. A developer must create a CreditCartPayment class that provides an Implementation of an existing Payment class. public virtual class Payment { public virtual void makePayment(Decimal amount) { /*implementation/ } } Which is the correct implementation?. public class CreditCardPayment implements Payment { public virtual void makePayment (Decimal amount) { /*implementation/ } }. public class CreditCardPayment extends Payment { public virtual void makePayment (Decimal amount) { /*implementation/ } }. public class CreditCardPayment extends Payment { public override void makePayment (Decimal amount) { /*implementation/ } }. public class CreditCardPayment implements Payment { public override void makePayment (Decimal amount) { /*implementation/ } }. Refer to the following Apex code: Integer x = 0; do { x = 1; x++; } while ( x < 1); system.debug(x);. 0. 1. 2. 3. A PrimaryId__c custom fleld 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 date upload?. Create a before Insert trigger to correctly map the records. Update the PrimaryId__c field definition to mark it as an External Id. Create a before save flow to correctly map the records. Upload the CSV into a custom object related to Candidate__c. Consider the following code snippet: public static List<Lead> obtainAllFields(Set<Id> leadIds) { List<Lead> result = new List<Lead> (); for (Id leadId : leadIds) { result.add([SELECT FIELDS(ALL) FROM Lead WHERE Id = :leadId]) } return result; } Given the multi-tenant architecture of the Salesforce platform, what is a best practice a developer should limplament and ensure successful execution of the method?. Avoid using variables as query filters. Avoid performing queries inside for loops. Avoid executing queries without a limit clause. Avoid returning an empty List of records. Wich two sfdx commands can be used to add testing data to a Developer sandbox?. force:data:bulk:upsert. force:data:tree:import. force:data:async:upsert. force:data:object:create. A custom object Trainer__c has a lookup field to another custom object Gym__c. SELECT Id, (SELECT Id FROM Trainers__r) FROM Gym__c WHERE Name = 'Viridian City Gym'. SELECT Id, (SELECT Id FROM Trainers__c) FROM Gym__c WHERE Name = 'Viridian City Gym'. SELECT ID FROM Trainer__c WHERE Gym__r.Name = 'Viridian City Gym'. SELECT Id, (SELECT Id FROM Trainer__c) FROM Gym__c WHERE Name = 'Viridian City Gym'. A developer is writing test for a class and needs to insert records to validate functionality. Which annotation method should be used to create records for every method in the test class?. @isTest (SeeAllData=true). @TestSetup. @StartTest. @PreTest. 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?. webservice class webServiceClass { private Boolean helperMethod () { /*implementation.....*/ } global static String updateRecords () { /*implementation.....*/ } } }. global class webServiceClass { private Boolean helperMethod () { /*implementation.....*/ } webservice static String updateRecords () { /*implementation.....*/ } } }. global class webServiceClass { private Boolean helperMethod () { /*implementation.....*/ } global String updateRecords () { /*implementation.....*/ } } }. Where are two locations a developer can look to find information about the status of batch or future methods? Choose 2 answers: Developer Console. Paused Flow Interviews component. Apex Flex Queue. Apex Jobs. Which action may cause triggers to fire?. Renaming or replacing a picklist entry. Updates to Feed Items. Changing a user's default division when the transfer division option is checked. Cascading delete operations. Which Salesforce org has a complete duplicate copy of the production org Including data and configuration?. Production. Full Sandbox. Developer Pro Sandbox. Partial Copy Sandbox. 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 Security.stripInaccessible to remove fields inaccessible to the current user. Use Lightning Data Service to get the collection of sales records. Use Lightning Locker Service to enforce sharing rules and field-level security. Use WITH SECURITY_ENFORCED in the SOQL that fetches the data for the component. A lead developer creates an Apex interface called Laptop. Consider the following code snippet: public class SilverLaptop { //code implementation }. @Extends (class="Laptop") public class SilverLaptop. @Interface (class="Laptop") public class SilverLaptop. public class SilverLaptop implements Laptop. public class SilverLaptop extends Laptop. 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?. Account.isDeletable(). Schema.sObectType.Account.isDeletable(). accountRec.isDeletable(). accountRec. sObjecType. isDeletable(). 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 error condition formula on a validation rule on Opportunity. An Apex trigger on the Opportunity object. An approval process on the Opportunity object. A record trigger flow on the Opportunity object. Which code statement includes an Apex method updateAccounts in the class AccountController for use a Lightning web component?. import updateAccounts from 'AccountController';. import updateAccounts from 'AccountController.updateAccounts';. import updateAccounts from '@salesforce/apex/AccountController';. import updateAccounts from '@salesforce/apex/AccountController.updateAccounts';. 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 based on an ad-hoc basis 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 thet calls a helper method using @Future (Callout=true) to perform the HTTP REST callout. 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 Visualtorce page that performs the HTTP REST callout, and use a Visuelforce quick action to expose the component on the Opportunity detail page. Create a Lightning component that performs the HTTP REST callout, and use a Lightning Action to expose the component on the Opportunity detail page. What should be used to create scratch orgs?. Developer Console. Workbench. Salesforce CLI. Sandbox refresh. 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?. Order has a re-parentable master-detall field to Line Item. Line Item has a re-parentable lookup field to Order. Line Item has a re-parentable master-detail field to Order. Order has a re-perentable lookup fleld to Line Item. A development team wants to use @ 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. Developer Console. SFDX CLI. Change Sets. VSCode. A business has a proprietary Order Management System (OMS) that creates orders from their website and fulfills the orders. When the orders 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. Its noticed that each update from the OMS creates a new order record in Salesforce. Which two actions will prevent the duplicate order records from being created In Salesforce? Choose 2 answers,. Ensure that the order number in the OMS is unique. Use the email on the contact record as an external ID. Use the order number from the OMS as an external ID. Write a before trigger on the order object to delete any duplicates. A developer created these three Rollup Summary fields In the custom object, Project__c: Total _Timesheets__c: Total _Approved_Timesheets__c: Total _Rejected_Timesheets__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?. Rollup summary fleld. Apex trigger. Record-triggered flow. Formula field. 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"?. 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'. FIND 'Universal Containers' IN CompanyName Fields RETURNING lead(id, name), account(id, name), contact(id, name). Universal Containers wants Opportunities to no longer be editable when reaching the Closed/Won stage. How should a developer accomplish this?. Use Flow Builder. Use a validation rule. Mark fields as read-only on the page layout. Use the Process Automation settings. 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 page in Salesforce Classic and a Visualforce page in Lightning Experience. A Visualtorce page in Salesforce Classic and Lightning component in Lightning Experience. A Visuattorce page in Salesforce Classic and a Lightning page in Lightning Experience. A Lightning component in Salesforce Classic and a Lightning component in Lightning Experience. The Account object in an organization has a master-detall relationship to a child object called Branch. The following automations exist: -Roll-up summary flelds -Custom validation rules -Duplicate rules A developer created e trigger on the Account object. Which two things should the developer consider while testing the trigger code? Choose 2 answers. The trigger may fire multiple times during a transaction. Rollup summary fields can cause the parent record to go through Seve. The validation rules will cause the trigger to fire again. Duplicate rules are executed once all DML operations commit to the database. Which two events need to heppen when deploying to a production org? Choose 2 answers. All triggers must have some test coverage. All Visual flows must have at least 1% test coverage. Alll Workflow rules must have at least 1% test coverage. All Apex code must have at least 75% test coverage. |