option
Cuestiones
ayuda
daypo
buscar.php

ohana2

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

Descripción:
para practicar cosas

Fecha de Creación: 2026/03/19

Categoría: Otros

Número Preguntas: 60

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

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. (Revisar: según chat podría ser el Flow también). Use a formula field on the Case object. Use a trigger on the Case object. Use a validation rule on the Case object. Use an Assignment Flow element.

Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a master-detail relationship with the standard Account object. The Account object has a roll-up summary field on the Vendor object. The Account object does not allow changing a field type for a custom field. Some of the Vendor records have null for the Account field. The organization wide default for the Vendor object is Public Read/Write.

What is a benefit of developing applications in a multi-tenant environment?. Enforced unit testing and code coverage best practices. Preconfigured storage for big data. Unlimited processing power and memory. Access to predefined computing resources.

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 another custom object called PostalCodeToTimezone__c. What is the optimal way to implement this feature?. Build an account assignment rule. Create a formula field. Build a flow with Flow Builder. Create an account approval process.

What is the result of the following code? Account a = new Account(); Database.insert(a, false);. The record will be created and no error will be reported. 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 a message will be in the debug log.

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 the Test.loadData() method. Use without sharing on the class declaration. Use the @isTest(SeeAllData=true) annotation. Use a Test Data Factory class.

What is the result of the following code snippet? public void doWork(Account acct){ for (Integer i = 0; i <= 200; i++) { insert acct; } } (Revisar: según chat sería 1 porque se repetiría Id en la segunda vuelta). 0 Accounts are inserted. 1 Account is inserted. 200 Accounts are inserted. 201 Accounts are inserted.

When using Salesforce DX, what does a developer need to enable to create and manage scratch orgs?. Environment Hub. Dev Hub. Sandbox. Production.

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 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. Create a mock using the Stub API.

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<sObject> searchList = [FIND '*ACME*' IN ALL FIELDS RETURNING Contact, Lead];. Map<sObject> searchList = [FIND 'ACME*' IN ALL FIELDS RETURNING Contact, Lead];. List<List<sObject>> searchList = [FIND '*ACME*' IN ALL FIELDS RETURNING Contact, Lead];.

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 type="number" value="Salary__c" formatter="currency"> </lightning-input>. <lightning-input-currency value="Salary__c"> </lightning-input-currency>. <lightning-input-field field-name="Salary__c"> </lightning-input-field>. <lightning-formatted-number value="Salary__c" format-style="currency"> </lightning-formatted-number>.

What can be easily developed using the Lightning Component framework?. Salesforce Classic user interface pages. Salesforce integrations. Lightning Pages. Customized JavaScript buttons.

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? (Revisar: según chat es crear una test class). 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. Include a try/catch block to the Apex class. Include a savepoint and Database.rollback().

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 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. Write a trigger on the Opportunity object and use an aggregate function to sum the amount for all related child objects under the Opportunity. Use the Streaming API to create real-time roll-up summaries.

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 can be done using the Setup menu. Declarative code logic does not require maintenance or review. Declarative development has higher design limits and query limits.

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

How does the Lightning Component framework help developers implement solutions faster?. By providing device-awareness for mobile and desktops. By providing an Agile process with default steps. By providing change history and version control. By providing code review standards and processes.

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. Select the Allow reparenting option on the master-detail relationship. Change the master-detail relationship to an external lookup relationship. Create a junction object between OrderItem and Order.

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? (Revisar: implements). @extends(class="Laptop") public class SilverLaptop. @Interface(class="Laptop") public class SilverLaptop. public class SilverLaptop implements Laptop. public class SilverLaptop extends Laptop.

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 WebServiceMock. Write a class that extends WebServiceMock. Write a class that extends HTTPCalloutMock. Write a class that implements HTTPCalloutMock.

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. In 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. Trigger. Invocable method. Future method. Flow.

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 Visualforce page in Salesforce Classic and a Lightning page in Lightning Experience. A Lightning page in Salesforce Classic and a Visualforce page in Lightning Experience. A Lightning component in Salesforce Classic and a Lightning component in Lightning Experience. A Visualforce page in Salesforce Classic and a Lightning component in Lightning Experience.

What should a developer use to script the deployment and unit test execution as part of continuous integration?. Salesforce CLI. Developer Console. Execute Anonymous. VS Code.

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; } Based on this code, what is the value of x?. 4. 3. 2. 1.

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 save flow to correctly map the records. Create a before insert trigger to correctly map the records. Update the PrimaryId__c field definition to mark it as an External Id.

Considering the following code snippet: 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. Remove null items from the list of Accounts. Implement Change Data Capture. Implement a try/catch block for the DML.

A development team wants to use a deployment script to automatically deploy to a sandbox during the development cycles. Which two tools can they use to run a script that deploys to a sandbox? Choose 2 answers. Developer Console. Ant Migration Tool. SFDX CLI. Change Sets.

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; }. 0. 100. 500. 150.

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 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_Application__c) FROM Contact WHERE Account.Industry = 'Technology'];. [SELECT Id, (SELECT Id FROM Job_Applications__c) FROM Contact WHERE Accounts.Industry = 'Technology'];. [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'];.

A developer must implement a CheckPaymentProcessor class that provides check processing payment capabilities that adhere to what is defined for payments in the PaymentProcessor interface. public interface PaymentProcessor { void pay(Decimal amount); } Which implementation is correct to use the PaymentProcessor interface class? (Está cortada). public class CheckPaymentProcessor implements PaymentProcessor { public void pay(Decimal amount) { // functional code here } }. public class CheckPaymentProcessor extends PaymentProcessor { public void pay(Decimal amount); }.

What should the developer change about the code to address the failure while still having the code update all of the Assets correctly?. Add a LIMIT clause to the SOQL query on line 16 to limit the number of Assets queried for an Account. 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 List<Asset> assets = [SELECT Id, Status__c FROM Asset WHERE AccountId = :acctId] to line 14 and iterate over the assets list in the for loop on line 15. Move all of the logic to a Queueable class that queries for and updates the Assets and call it from the trigger.

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.isDeletable(). Schema.sObjectType.Account.isDeletable(). Account.isDeletable(). accountRec.sObjectType.isDeletable().

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. XML file. Apex class. HTML file.

A developer writes a trigger on the Account object on the before update event that increments a count field. A record triggered flow also increments the count field every time that an Account is created or updated. What is the value of the count field if an Account is inserted with an initial value of zero, assuming no other automation logic is implemented on the Account?. 2. 3. 4. 1.

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 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. Use a CEILING formula on each of the latest availability date fields.

When importing and exporting data into Salesforce, which two statements are true? Choose 2 answers (Revisar: la de "Bulk API be used to import" y la de "Developer..."). Bulk API can be used to import large data volumes in development environments without bypassing the storage limits. Data import wizard 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. Developer and Developer Pro sandboxes have different storage limits.

Which three code lines are required to create a Lightning component on a Visualforce page? Choose 3 answers. $Lightning.createComponent. <apex:slds/>. $Lightning.use. $Lightning.useComponent. <apex:includeLightning/>.

Which two statements are true about using the @testSetup annotation in an Apex test class? Choose 2 answers (Revisar: la de "In a test setup..." y la de "A method defined...". In a test setup method, test data is inserted once and made available for all test methods in the test class. Records created in the test setup method cannot be updated in individual test methods. 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.

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 static List<Recommendation> getLevel(List<ContactWrapper> input) { /* implementation */ }. @InvocableMethod global List<List<Recommendation>> getLevel(List<ContactWrapper> input) { /* implementation */ }. @InvocableMethod global Recommendation getLevel(ContactWrapper input) { /* implementation */ }. @InvocableMethod global static List<List<Recommendation>> getLevel(List<ContactWrapper> input) { /* implementation */ }.

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. Lightning Data Service handles sharing rules and field-level security. The with sharing keyword must be used to enforce sharing rules. Lightning Data Service ignores field-level security.

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. Disable the batch job and recreate it with a smaller number of records. Decrease the batch size to reduce the load on the system.

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 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. An External ID is indexed and can improve the performance of SOQL queries.

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: All methods in the test classes must use @isTest. At least one line of code must be executed for the Apex trigger. Test methods must be declared with the testMethod keyword. Apex classes must have at least 75% code coverage org-wide.

For which three items can a trace flag be configured? Choose 3 answers. Visualforce. Flow. User. Apex Class. Apex Trigger.

What can be used to override the Account’s standard Edit button for Lightning Experience?. Lightning flow. Lightning action. Lightning component. Lightning page.

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?. Wrap the Lightning Web Component in an Aura Component and surface the Aura Component as a Visualforce tab. Embed the Lightning Web Component in a Visualforce Component and add directly to the page layout. Use a Visualforce page with a custom controller to invoke the Lightning Web Component using a call to an Apex method. Use the Lightning Out JavaScript library to embed the Lightning Web Component in a Visualforce page and add to the page layout.

A developer wants to improve runtime performance of Apex calls by caching results on the client. What is the most efficient way to implement this and follow best practices?. Call the setStorable() method on the action in the JavaScript client-side code. Decorate the server-side method with @AuraEnabled(cacheable=true). Decorate the server-side method with @AuraEnabled(storable=true). Set a cookie in the browser for use upon return to the page.

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 implements Order. public class CustomerOrder extends OrderRequest. %Extends(class="OrderRequest"). @Implements(class="OrderRequest") public class CustomerOrder.

Universal Containers wants Opportunities to no longer be editable when reaching the Closed/Won stage. How should a developer accomplish this?. Use the Process Automation settings. Use Flow Builder. Mark fields as read-only on the page layout. Use a validation rule.

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?. The validation rules will cause the trigger to fire again. Rollup summary fields can cause the parent record to go through Save. The trigger may fire multiple times during a transaction. Duplicate rules are executed once all DML operations commit to the database.

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: true. bubbles: true, composed: false. bubbles: false, composed: false. bubbles: false, composed: true.

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 Update Records element. Add a new Create Records element. Add a new Get Records element. Add a new Roll Back Records element.

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 browser. Data Import Wizard can not import all 500 records.

Which three resources in an Aura component can contain JavaScript functions?. Style. Helper. Renderer. Design. Controller.

Which three data types can a SOQL query return? Choose 3 answers (Revisar: sObject, Double, Integer). sObject. Double. Long. List. Integer.

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.

Which two are best practices when it comes to Aura component and application event handling?. Reuse the event logic in a component bundle, by putting the logic in the helper. Handle low-level events in the event handler and re-fire them as higher-level events. Try to use application events as opposed to component events. Use component events to communicate actions that should be handled at the application level.

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?. Roll-up summary field. Formula field. Quick action. Apex trigger.

What are three considerations when using the @InvocableMethod annotation in Apex? Choose 3 answers. Only one method using the @InvocableMethod annotation can be defined per Apex class. A method using the @InvocableMethod annotation must be declared as static. A method using the @InvocableMethod annotation can be declared as Public or Global. A method using the @InvocableMethod annotation can have multiple input parameters. A method using the @InvocableMethod annotation must define a return value.

What should be used to create scratch orgs?. Workbench. Salesforce CLI. Developer Console. Sandbox refresh.

Denunciar Test