option
Cuestiones
ayuda
daypo
buscar.php

asdfghjklñ1

COMENTARIOS ESTADÍSTICAS RÉCORDS
REALIZAR TEST
Título del Test:
asdfghjklñ1

Descripción:
asdfghjklñ 1

Fecha de Creación: 2026/11/28

Categoría: Otros

Número Preguntas: 60

Valoración:(0)
COMPARTE EL TEST
Nuevo ComentarioNuevo Comentario
Comentarios
NO HAY REGISTROS
Temario:

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 lookup field to Order. Order has a re-parentable master-detail field to Line Item. Order has a re-parentable lookup field to Line Item. Line Item has a re-parentable master-detail field to Order.

The OrderHelper class is a utility class that contains business logic for processing orders. Consider the following code snippet: Public class without sharing OrderHelper { //code implementation } A developer needs to create a constant named DELIVERY_MULTIPLIER with a value of 4.15. The value of the constant should not change at any time in the code. How should the developer declare the DELIVERY_MULTIPLIER constant to meet the business objectives?. Static final decimal DELIVERY_MULTIPLIER = 4.15;. Decimal DELIVERY_MULTIPLIER = 4.15;. Static decimal DELIVERY_MULTIPLIER = 4.15:. Constant decimal DELIVERY_MULTIPLIER = 4.15;.

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? Select two. Add <masterLabel>Account</masterLabel> to the statusComponent.js-meta.xml file. Add <target>lightning__Recordpage</target> to the statusComponent.js file. Add <target>lightning__Recordpage</target> to the statusComponent.js-meta.xml file. Set isExposed to true in the statusComponent.js-meta-xml file.

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 draw (); } Which is the correct implementation?. Public class DrawList implements Sortable, Implements Drawable { public void sort() { /*implementation*/} public void draw() { /*implementation*/} ]. Public class DrawList extends Sortable, Drawable { public void sort() { /*implementation*/} public void draw() { /*implementation*/} }. Public class DrawList extends Sortable, extends Sortable, extends Drawable { public void sort() { /*implementation*/ } public void draw() { /* implementation */}. Public class DrawList implements Sortable, Drawable { public void sort() { /*implementation*/} public void draw() { /*implementation*/} }.

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?. Use the Apex Interactive Debugger to step through the code and identify the issue. Review the Historical Event logs to identify the source of the issue. Disable the trigger in production and test to see if the issue still occurs. Add system.debug statements to the code to track the execution flow and identify the issue.

Which two characteristics are true for Lightning Web Component custom events? Select two. Data may be passed in the payload of a custom event using a property called detail. 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 @wire decorated properties. By default a custom event only propagates to it’s immediate container.

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__c; } } Which governor limit will likely be exceeded within the Apex transaction?. Total number of records processed as a result of DML statements. Total number of DML statements issued. Total number of records retrieved by SOQL queries. Total number of SOQL queries issued.

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 options. 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> result = Database.query(query). String query = ‘%’ + name + ‘%’; List<Account> result = [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);.

As a 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 options. Visualforce Components. Lightning Web Components. Aura Components. Visualforce Pages.

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 options. 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. Create an after update trigger on the Opportunity object that calls a helper method using @Future(Callout=true) to perform the HTTP REST callout.

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?. 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. Use an Approval Process to enforce the completion of a valid email address using an outbound message action. Submit a REST API Callout with a JSON payload and validate the fields on a third party system.

Given the following Apex statement: Account myAccount = [SELECT Id, Name FROM Account]; What occurs when more than one Account is returned by the SOQL query?. An unhandled exception is thrown and the code terminates. The variable, myAccount, is automatically cast to the List data type. The first Account returned is assigned to myAccount. The query fails and an error is written to the debug log.

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 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?. Add @IsTest above line 03. Add @IsTest above line 01. Change public to private on line 01. Remove static from line 03.

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?. 1. 3. 0. 2.

Which two actions may cause triggers to fire? Choose 2 options. Cascading delete operations. Changing a user’s default division when the transfer division option is checked. Renaming or replacing a picklist entry. Updates to FeedItem.

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 Account. Data Loader runs from the developer’s browser. Data Import Wizard can not import all 500 records. Data Import Wizard does not support Opportunities.

What are two characteristics related to formulas? Choose 2 options. Formulas can reference themselves. Formulas are calculated at runtime and are not stored in the database. Fields that are used in a formula field can be deleted or edited without editing the formula. Formulas can reference values in related objects.

What should a developer use to fix a Lightning web component bug in a sandbox?. Force.com IDE. Execute Anonymous. Developer Console. VS Code.

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 decided to set up Continuous Integration (CI). What should the UC development team use to automatically run tests as part of their CID Process?. Force.com Toolkit. Salesforce CLI. Visual Studio Code. Developer Console.

A developer is asked to prevent anyone other than a user with Sales Manager profile from changing the Opportunity Status to Close Lost if the lost reason is blank. Which automation allows the developer to satisfy this requirement in the most efficient manner?. An approval process on the Opportunity object. An Apex trigger on the Opportunity object. A record trigger flow on the Opportunity object. An error condition formula on a validation rule on Opportunity.

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 options. Insert pageRef;. Public ExtendedController (ApexPages.StandardController cntrl) {}. ApexPages. currentPage().getParameters().put(‘input’, ‘TestValye’);. String nextPage = controller.save().getUrl();. Test.setCurrentPage(pageRef);.

What is an example of a polymorphic lookup filed in Salesforce?. WhatId field on the standard Event object. The ParentdId field on the standard Account object. A custom field, Link__c, on the standard Contact object that looks up to an Account or a Campaign. The LeadId and ContactId fields on the standard Campaign Member object.

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 ation=”{!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?. Custom controller. Controller extension. Validation rule. Apex trigger.

A developer 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 options. Developer Console. SFDX CLI. Change Sets. VSCode.

Which three steps allow a custom Scalable Vector Graphic (SVG) to be included in a Lightning web Component?. Import the static resource and provide a JavaScript property for it. Reference the import in the HTML template. Reference the property in the HTML template. Upload the SVG as a static resource. Import the SVG as a content asset file.

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 Schedule Apex Class. Schedule a report. Define a Data Export scheduled job.

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 Test.getStandardPricebookId() to get the standard price book ID. Use Test.loadData() and a static resource to load a standard price book. Use @isTest(SeeAllData=true) and delete the existing standard price book. Use @TestVisible to allow the test method to see the standard price book.

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?. Record-triggered flow on Opportunity. Auto-launched flow on Taks. Task actions. Apex trigger on Task.

A developer wants to mark each Account in a List<Account> as either Active or Inactive, based on the value in the LastModifiedDate field of each Account being greater than 90 days in the past. Which Apex technique should the developer use?. A for loop, with an if or if/else statement inside. A if-else statement, with a for loop inside. A switch statement, with a for loop inside. A for loop, with a switch statement inside.

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, (SELECT Id FROM Trainers__c) FROM GYM WHERE Name = ‘Viridian City Gym’. SELECT Id, (SELECT Id FROM Trainers__r) FROM GYM WHERE Name = ‘Viridian City Gym’. Select ID FROM Trainer__c WHERE Gym.Name = ‘Viridian City Gym’. SELECT Id, (SELECT Id FROM Trainer__c) FROM Gym__c WHERE Name = ‘Viridian City Gym’.

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?. @AuraEnabled(cacheable=true). @AuraEnabled. @RemoteAction(cacheable=true). @RemoteAction.

An Apex method, getAccounts, that returns a list of Accounts given a searchTern, is available for Lightning Web Components to use. What is the correct definition of a Lightning Web Component property that uses the getAccounts method?. @wire(getAccounts, { searchTerm: ‘$SearchTern’ }) accountList;. @AuraEnabled(getAccounts, ‘$searchTerm’) accountList;. @wire(getAccounts, ‘$searchTerm’) accountList;. @AuraEnabled(getAccounts, { searchTerm: ‘$searchTerm’ }) accountList;.

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?. Visual Studio Code IDE. AppExchange. Developer Console. Setup Menu.

The sales management team at Universal Containers requires that the Lead Source field of the Lead record be populated when a Lead is converted. What should be done to ensure that a user populates the Lead Source field prior to converting a Lead?. Use a validation rule. Use Lead Conversion field mapping. Use a formula field. Create an after trigger on Lead.

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?. Query the Profile where the ID equals userInfor.getProfileID() and then use the profile.Opportunity.getDefaultRecordType() method. User the Schema.userInfor.Opportunity.getDefaultRecordType() method. Use Opportunity.SObjectType.getDescribe().getRecordTypeInfors() to get a list of record types, and iterate through them until isDefaultRecordTypeMapping() is true. Create the opportunity and check the opportunity.recordType, which will have ther ecord ID of the current user’s default record type, before inserting.

What are two ways a developer can get the status of an enqueued job for a class that implements the queueable interface? Choose 2 options. Query the AsyncApexJob object. View the Apex Jobs page. View the Apex Flex Queue. View the Apex Status page.

What are two ways for a developer to execute tests in an org? Choose 2 options. Tooling API. Developer Console. Bulk API. Metadata API.

A credit card company needs to implement the functionality for a service agent to process damaged or stolen credit cards. When the customer 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. Lightning Component. Approval process. Screen-based flow.

A developer has identified a method in an apex class that performs resource intensive actions in memory by iterating over the result set of a SOQL statement on the account. The method also performs a DML statement to save the changes to the database. Which two techniques should the developer implement as a best practice to ensure transaction control and avoid exceeding governor limits? Choose 2 options. Use partial DML statements to ensure only valid data is committed. Use the System.Limit class to monitor the current CPU governor limit consumption. Use the Database. Savepoint method to enforce database integrity. Use the @ReadOnly annotation to bypass the number of rows returned by a SOQL.

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 options. New ParityException(‘parity does not match’);. Throw new ParityException(‘parity does not match’);. Throw new ParityException();. New ParityException();.

Which statement describes the execution order when triggers are associated to the same object and event?. Triggers are executed in the order they are modified. Trigger execution order cannot be guaranteed. Triggers are executed alphabetically by trigger name. Triggers are executed in the order they are created.

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 with sharing keyword. Use the inherited sharing keyword. Use the without sharing keyword. Use the WITH SECURITY_ENFORCED clause within the SOQL.

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> performSeach(String lastName){ return Data.query(‘SELECT Id, FristName, LastName FROM Contact WHERE LastName like %’+lastNamee+’%’); } What are two ways the developer can update the method to prevent a SOQL injection attack? Choose 2 options. Use the escapeSignQuotes method to sanitize the parameter before its use. Use the @ReadOnly annotation and the with sharing keyword on the class. Use variable binding and replate the dynamic query with a static SOQL. Use a regular expression on the parameter to remove special characters.

Which two phases in the Aura application event propagation framework? Choose 2 options. Default. Control. Emit. Bubble.

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 of the Apex Classes page. Select and run the class on the Apex Test Execution page in the Developer Console. View the code coverage percentage for the class using the Overall Code Coverage panel in the Developer Console Tests tab. View the Class Test Percentage tab on the Apex Class list view in Salesforce Setup.

Universal Containers is developing a new Lightning web component for their marketing department. They want to ensure that the component is fine tuned and provides a seamless user experience. What are some benefits of using the Lightning Component framework?. Automatic support for accessibility standards. Easy integration with third-party libraries. Compatibility with all web browsers. Better performance due to client-side rendering.

What are two considerations for deploying from a sandbox to production?. Should deploy during business hours to ensure feedback can be quickly addressed. All triggers must have at least one line of test coverage. At least 75% of Apex code must be covered by unit test. Unit test must have calls to the System.assert method.

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, false). insert records. insert (records, false). Database.insert(records, true).

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(caseToUpdate,false); }catch(Exception e){ System.debug(e.getMessage()); } What should a developer consider for an environment that has over 10000 case records?. The try-catch block will handle any DML exceptions thrown. The transaction will fail due to exceeding the governor limit. The try-catch block will handle exceptions thrown by governor limits. The transaction will succeed and changes will be committed.

A developer needs to prevent the creation of Request__c records when certain conditions exist in the system. A RequestLogic 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__c (after insert){ if (RequestLogic.isValid(Request__c)) Request.addError(‘Your request cannot be created at this time.’); }. trigger RequestTrigger on Request__c (before insert){ if (RequestLogic.isValid(Request__c)) Request.addError(‘Your request cannot be created at this time.’); }. trigger RequestTrigger on Request__c (before insert) { RequestLogic.validateRecords(trigger.new); }.

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:facet name=”messages” />. <apex:pageMessages />. <apex:pageMessage severity=”infor” />. <apex:message for=”infor”/>.

Universal Containers has a large number of custom applications that were built 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?. Set the attribute enableLightning to true in the definition. Rewrite all Visualforce pages as Lightning components. Incorporate the Salesforce Lightning Design System CSS stylesheet into the JavaScript applications. Enable Available for Lightning Experience, Lightning Communities, and the mobile app on Visualforce pages used by the custom application.

How can a developer check the test coverage of autolaunched Flow before deploying them in a change set?. Use the Flow Properties page. Use SOQL and the Tooling API. Use the ApexTestResult class. Use the Code Coverage Setup page.

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 (STANDARD) FROM Lead WHERE Id = :leadId]); } return result; } Given the multi-tenant architecture of the Salesforce platform, what is the best practice a developer should implement and ensure successful execution of the method?. Avoid performing queries inside for loops. Avoid executing queries without a limit clause. Avoid returning an empty List of records. Avoid using variables as query filters.

A software company uses the following object and relationships: • Case: to handle customer support issues. • Defect__c: a custom object to represent known issues with the company’s softwate. • 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 a Private organization-wide defaults. What should be done to share a specific Case_Defect__c record with a user?. Share the parent Case record. Share the parent Defect__C record. Share the Case_Defect__c record. Share the parent Case and Defent__c records.

The values ‘High’, ‘Medium’, and ‘Low’ are identified as common values for multiple picklists across different objects. What is an approach a developer can take to streamline maintenance of the picklists and their values, while also restricting the values to the ones mentioned above?. Create a picklist on each object and use a Global Picklist Value Set containing the values. Create the Picklist on each object and add a validation rule to ensure data integrity. Create a Picklist on each object and select “Restrict picklist to the value defined in the value set”. Create the Picklist on each object as a required field and select “Display values alphabetically, not in the order entered”.

A lightning component has a wired property, searchResults, that stores a list of Opportunites. Which definition of the Apex method, to which the searchResults property is wired, should be used?. A) @AuraEnabled(cacheable=false) public static List<Opportunity> search(String term) {/*implementation*/}. @AuraEnabled(cacheable=true) public static List<Opportunity> search(String term) {/*implementation*/}. @AuraEnabled(cacheable=true) public List<Opportunity> search(String term) {/*implementation*/}. @AuraEnabled(cacheable=false) public List<Opportunity> search(String term) {/*implementation*/}.

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, BodyFat, and its method, calculateBodyFat(). The product owner wants to ensure this method is accessible by the customer of the application when developing customization 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 public access modifier. 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 as global and use the public access modifier on the method.

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 a 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 to report multiple bugs and bugs can also be reported by multiple companies. What is needed to allow this reporting?. Roll-up summary field of a Bug__c on Account. Lookup field on Bug__c to Account. Master-detail field on Bug__c to Account. Juntion object between Bug__c and Account.

Denunciar Test