option
Cuestiones
ayuda
daypo
buscar.php

agaporni 725

COMENTARIOS ESTADÍSTICAS RÉCORDS
REALIZAR TEST
Título del Test:
agaporni 725

Descripción:
Un test to wapo

Fecha de Creación: 2025/06/09

Categoría: Matemáticas

Número Preguntas: 59

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

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.

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

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?. throw new ParityException('parity does not match');. throw new ParityException();. new ParityException('parity does not match');. new ParityException();.

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') accountList;. @AuraEnabled(getAccounts, { searchTerm: '$searchTerm' }) accountList;. @wire(getAccounts, '$searchTerm') accountList;. @wire(getAccounts, { searchTerm: '$searchTerm' }) accountList;.

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_Default__c record with a user?. Share the Case_Defect__c record. Share the parent Case record. Share the parent Defect__c record. Share the parent Case and Defect__c records.

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. Use an Approval Process to enforce the completion of a valid email address using an outbound message action. Use a custom Lightning Web Component to make a callout to validate the fields on a third party system. Submit a REST API Callout with a JSON payload and validate the fields on a third party system. Use a before-save Apex trigger on the Lead object to validate the email address and display an error message if it is invalid.

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 exceptions thrown by governor limits. The transaction will succeed and changes will be committed. The transaction will fall due to exceeding the governor Iimit. The try-catch block will handle any DML exceptions thrown.

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:pageMessage severity-"info" />. <ареx:facet name="messages" />. <арex:message for="info"/>. <apex:pageMessages />.

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

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 Import Wizard does not support Opportunities. Data Loader automatically relates Opportunities to Accounts. Data Loader runs from the developer's browse. Data Import Wizard can not import all 500 records.

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

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.

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 Class Test Percentage tab on the Apex Class list view in Salesforce Setup. 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.

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?. Set isExposed to true in the statusComponent.js-meta.xml file. 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.

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

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

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; update thisLead; } } 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.

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 approval process on the Opportunity object. A record trigger flow on the Opportunity object. An error condition formula on a validation rule on Opportunity. An Apex trigger on the Opportunity object.

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

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?. Visualforce Pages. Aura Component. Lightning Web Component. Visualforce Components.

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?. Define a Data Export scheduled job. Use the Data Loader command line. Create a Schedulable Apex class. Schedule a report.

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 switch statement, with a for loop inside. An if-else statement, with a for loop inside. A for loop, with a switch statement Inside.

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

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?. String query = 'SELECT Id FROM Account WHERE Name LIKE \'%' + string.escapeSingleQuotes(name) + '%\''; 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 \'%' + name.noQuotes() + '%\''; List<Account> results = Database.query(query);. String query = '%' + name + '%'; List<Account> results = [SELECT Id FROM Account WHERE Name LIKE :query];.

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?. constant decimal DELIVERY_MULTIPLIER = 4.15;. decimal DELIVERY MULTIPLIER = 4.15;. static decimal DELIVERY_MULTIPLIER = 4.15;. static final decimal DELIVERY_MULTIPLIER = 4.15;.

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

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 (before insert) { if (RequestLogic.isValid(Request__c)) Request.addError('Your request cannot be created at this time.'); }. 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) { RequestLogic.validateRecords(trigger.new); }.

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 extends Sortable, Drawable public void sort() { /*implementation*/} public void draw() { /*implementation*/} }. public class DrawList implements Sortable, Drawable public void sort() { /*implementation*/} public void draw() { /*implementation*/} }. public class DrawList implements Sortable, implements Drawable public void sort() { /*implementation*/} public void draw() { /*implementation*/} }.

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

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

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__c WHERE Name = 'Viridian City Gym'. SELECT Id, (SELECT Id FROM Trainers__r) 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'.

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 the Picklist on eacn opject as a required field and select "Display values alphabetically, not in the order entered". Create the Picklist on each object and select "Restrict picklist to the values defined in the value set". Create the Picklist on each object and add a validation rule to ensure data integrity. Create the Picklist on each object and use a Global Picklist Value Set containing the values.

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 places of information. A developer is tasked to implement this functionality. What should the developer use to satisfy this requirement in the most efficient manner?. Lightning Component. Apex trigger. Screen-based flow. Approval process.

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

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?. 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().getRecordTypeInfos() 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. Use the Schema.userInfo.Opportunity.getDefaultRecordType() method.

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?. Use the @Readonly annotation and the with sharing keyword on the class. Use the escapeSingleQuotes method to sanitize the parameter before its use. Use variable binding and replace the dynamic query with a static SOQL. Use a regular expression on the parameter to remove special characters.

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?. Compatibility with all web browsers. Automatic support for accessibility standards. Easy integration with third-party libraries. Better performance due to client-side rendering.

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

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?. Force.com TooIkit. Visual Studio Code. Developer Console. Salesforce CLI.

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

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?. Use partial DML statements to ensure only valid data is committed. Use the Database.Savepoint method to enforce database integrity. Use the @ReadOnly annotation to bypass the number of rows returned by a SOQL. Use the System.Limit class to monitor the current CPU governor limit consumption.

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

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

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 query fails, and an error is written to the debug log. The first Account returned is assigned to myAccount. The variable, myAccount, is automatically cast to the List data type.

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. 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. Rewrite all Visualforce pages as Lightning components.

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 formula field. Create an after trigger on Lead. Use Lead Conversion field mapping. Use a validation rule.

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

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 @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. Use Test.getStandardPricebookId() to get the standard price book ID.

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

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

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

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 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 global and use the public access modifier on the method. Declare the class as public and use the global access modifier on the method. Declare the class and method using the public access modifler.

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

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

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

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

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?. Apex trigger. Custom controller. Validation rule. Controller extension.

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

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?. insert pageRef;. public ExtendedController(ApexPages.StandardController cntrl) {}. Test.setCurrentPage(pageRef);. String nextPage = controller.save().getUrl();. ApexPages.currentPage().getParameters().put('input', 'TestValue'):.

Denunciar Test