option
Cuestiones
ayuda
daypo
buscar.php

asdfghjklñ2

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

Descripción:
asdfghjklñ 2

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

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 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.

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 orgs. Developer sandboxes. Scratch orgs. Full Copy sandboxes.

Which two statements are true about using the @testSetup annotation in an Apex test class? Choose 2 options. 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. In a test setup method, test data is inserted once and made available for all test methods in the test class. The @testSetup annotation is not supported when the @isTest(SeeAllData=True) annotation is used.

When a use edits the Postal Code on an Account, a custom Account text field name “Timezone” must be updated based on the values in another custom object called PostalCodeToTimezone__c. what is the optimal way to implement this feature?. Create an account approval process. Create a formula field. Build a flow with Flow Builder. Build an account assignment rule.

A developer deployed a trigger to update the Status__c of Assets related to an Account when the Account’s status changes and a nightly integration that updates Accounts in bulk has started to fail with limit failures. 01: trigger AccountTrigger on Account (after update) { 02: List<Asset> assetsToUpdate = new List<Asset> (); 03: for (Account newA : Trigger.new) { 04: Account oldA = Trigger.oldMap.get(newA.Id); 05: if (oldA.Status__c != newA.Status__c) { 06: assetsToUpdate.addAll ( AccountHelper.getAssetsToUpdate (newA) ); 07: } 08: } 09: update assetsToUpdate; 10:} 11:public class AccountHelpter { 12: public static List<Asset> getAssetsToUpdate (Account acct) { 13: List<Asset> assetsToUpdate = new List<Asset>(); 14: 15: for (Asset asst :[ 16: SELECT Id, Status__c 17: FROM Asset 18: WHERE AccountId = :acct.Id]) { 19: if (asst.Status__c != acct.Status__c) { 20: asst.Status__c = acct.Status__c; 21: assetsToUpdate.add(asst); 22: } 23: } 24: return assetsToUpdate; 25: } 26:} What should the developer chante about the code to address the failure while still having the code update all of the Assets correctly?. Change the getAssetsToTupdate method to process all Accounts in once call and call it outside of the for loop that stats on line 03. Add a LIMIT clause to the SOQL query on line 16 to limit the number of Assets queried for an Account. Move all the logic to a Queueable class that queries for and updates the Assets and call it from the trigger. Add List<asset> assets = [SELECT Id, Status_c FROM Asset WHERE AccountId = :acctId) to line 14 and iterate over the assets list in the for loop on line 15.

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 debug logs for the batch job. Check the asynchronous job monitoring page to view the job status and logs. Decrease the batch size to reduce the load on the system. Disable the batch job and recreate it with a smaller number of records.

When importing and exporting data into Salesforce, which two statements are true? Choose 2 options. 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. 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.

Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a master-detail relationship with the standard Account object. Based on some internal discussions, the UC administrator tried to change the master-detail relationship to a lookup relationship, but wat not able to do so. What is a possible reason that his change was not permitted?. The Account object has a roll-up summary field on the Vendor object. The organization wide default for the Vendor object is Public Read/Write. Some of the Vendor records have null for the Account field. The Account object does not allow changing a field type for a custom field.

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

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

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

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

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

What are two benefits of using External IDs? Choose 2 options. 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 field can be used to reference an ID from another external system. An External Id is indexed and can improve the performance of SOQL queries.

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 the Apex class is working according to specifications?. Include a savepoint and Database.rollback(). Create a test class to execute the business logic and run the test in the Developer Console. Include a try/catch block to the Apex class. Run the code in an Execute Anonymous block in the Developer Console.

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 handle gracefully?. Implement Change Data Capture. Remove null items form the list of Accounts. Implement a try/catch block for the DML. Implement the upsert DML statement.

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

Which Lightning Web Component custom event property settings enable the event to bundle up the containment hierarchy and cross the Shadow DOM boundary?. Bubbles: true, composed: false. Bubbles: false, composed: true. Bubbles: false, composed: false. Bubbles: true, composed: true.

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

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

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

Which statement generates a list of Leads and Contacts that have a field with the phase ‘ACME’?. List<List <sObject>> searchList = [FIND ‘*ACME*’ IN ALL FIELDS RETURNING Contact, Lead];. Map <sObject> searchList = [FIND ‘*ACME*’ IN ALL FIELDS RETURNING Contact, Lead];. List <sObject> searchList = [FIND ‘*ACME*’ IN ALL FIELDS RETURNING Contact, Lead];. List<List <sObject>> searchList = [SELECT Name, ID FROM Contact, Lead WHERE Name like ‘%ACME%’];.

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

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

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

A developer considers the following snippet of code: Boolean isOK; interger 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?. 2. 1. 4. 3.

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, UC0s ERP system must be checked via a REST endpoint to see if the customer exists. If the custom exists, the data must be presented to the sales rep in Salesforce. Which two should a developer implement to satisfy the requirements? Choose 2 options. Flow. Invocable method. Trigger. Future method.

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?. Decorate the server-side method with @AuraEnabled(storable=true). Set a cookie in the browser for use upon return to the page. Decorate the server-side method with @AuraEnabled(cacheable=true). Call the setStorable() method on the action in the JavaScript client-side code.

Universal Containers wants to automatically assign new cases to the appropriate support representative based on the case origin. They have created a custom field on the Case object to store the support representative name. What is the best solution to assign the case to the appropriate support representative?. Use a 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.

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 type of Salesforce Cases. Which approach can efficiently generate the required data for each unit test?. Add @IsTest(seeAllData=true) at the start of the unit test class. Create test data before Test.startTest() in the unit test. Create a mock using the Stub API. Use @TestSetup with a void method.

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 the feature implementation, a developer needs to retrieve a list containing all Contact records where the related Account Industry is ‘Technology’, while also retrieving the Contact’s Job_Application__c records. Based on the object’s relationships, what is the most efficient statement to retrieve the list of Contact?. [SELECT Id, (SELECT Id FROM Job_Application__r) FROM Contact WHERE Accounts.Industry = ‘Technology’];. [SELECT Id, (SELECT Id FROM Job_Application__c) FROM Contact WHERE Accounts.Industry = ‘Technology’];. [SELECT Id, (SELECT Id FROM Job_Application__r) FROM Contact WHERE Account.Industry = ‘Technology’];. [SELECT Id, (SELECT Id FROM Job_Application__c) FROM Contact WHERE Account.Industry = ‘Technology’];.

A developer must write an Apex method that will 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 that should be able to delete Accounts can successfullt perform deletions?. accountRec.isDeletable(). Schema.sObjectType.Account.isDeletable(). Account.isDeletable(). accountRec.sObjectType.isDeletable().

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

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

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 available date on each Order Line Item and Orders are only shipped when all od the Order Line Items are available. Which method should be used to calculate the estimated ship date for an Order?. Use a MAX Roll-up Summary field on the latest available date fields. Use a CEILING formula on each of the latest available date fields. Use a LATEST formula on each of the latest availability date fields. Use a DAYS formula on each of the availability date fields and a COUNT Roll-up Summary field on the Order.

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

A development team wants to use a development script to automatically deploy to a sandbox during their development cycles. Which two tools can they use to run a script that deploys to sandbox?. Ant Migration Tool. Developer Console. SFDX CLI. Change Set.

A developer must provide custom user interface when user edit a Contact in either Salesforce Classic or Lighting 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 Visualforce page in Salesforce Classic and a Lightning page in Lightning Experience. A Visualforce page in Salesforce Classic and a Lightning component in Lightning Experience. A Lightning component in Salesforce Classic and a Lightning component in Lightning Experience.

An Opportunity needs to have an amount rolled up from a custom object that is not in a master-detail relationship. How can this be achieved?. Write a trigger on the Opportunity object and use an aggregate function to sum the amount for all related child objects under the Opportunity. Write a trigger on the child object and use an aggregate function to sum the amount for all related child objects under the Opportunity. Use the Streaming API to create real-time roll-up summaries. Use the Metadata 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 options. Declarative code logic does not require maintenance or review. Declarative development has higher design limits and query limits. Declarative development can be done using the Setup menu. Declarative development does not require Apex test classes.

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?. 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. Create a before insert trigger to correctly map the records.

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

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

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

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?. public class CheckPaymentProcessor extends PaymentProcessor { public void pay(Decimal amount) {// functional code here} }. public class CheckPaymentProcessor extends PaymentProcessor { public void pay(Decimal amount); }. public class CheckPaymentProcessor implements PaymentProcessor { public void pay(Decimal amount) {// functional code here} }. public class CheckPaymentProcessor implements PaymentProcessor { public void pay(Decimal amount); }.

The Account object in an organization has a master-detail relationship to a child object called Branch. The following automations exists: • Roll-up summary fields. • Custom validation rules. • Duplicate rules. A developer created a trigger on the Account object. Which two things should the developer consider while testing the trigger code? Choose 2 options. The trigger may fire multiple times during a transaction. Duplicate rules are executed once all DML operations commit to the database. Roll-up summary fields can cause the parent record to go through Save. The validation rules will cause the trigger to fire again.

A Next Best Action strategy uses an Enhance element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors. What is the correct definition of the Apex method?. @InvocableMethod global List<List<Recommendation>> getLevel(List<ContactWrapper> input) { /*implementation*/}. @InvocableMethod global static ListRecommendation getLevel(List<ContactWrapper> input) { /*implementation*/}. @InvocableMethod global static List<List<Recommendation>> getLevel(List<ContactWrapper> input) { /*implementation*/}. @InvocableMethod global Reccomendation getLevel(ContactWrapper input) { /*implementation*/}.

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

A lead developer creates a virtual class called “OrderRequest”. Consider the following code snippet: public class CustomerOrder{ //code implementation } How can a developer use the OrderRequest class within the CustomerOrder class?. @Extends(class=”OrderRequest”) public class CustomerOrder. public class CustomerOrder implements Order. public class CustomerOrder extends OrderRequest. @Implements(class=”OrderRequest”) public class CustomerOrder.

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 updates. 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. 1. 4.

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

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

A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an OrderItem object that has a master-detail relationship to Order. During order processing, an order may be split into multiple orders. What should a developer do to allow their code to move some existing OrderItem records to a new Order record?. Add without sharing to the Apex class declaration. Change the master-detail relationship to an external lookup relationship. Select the Allow reparenting option on the master-detail relationship. Create a junction object between OrderItem and Order.

An org has an existing flow that edits an Opportunity with an Update Records elements. 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 Roll Back Record element. Add a new Create Records element. Add a new Get 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 Loader runs from the developer’s browser. Data Import Wizard does not support Opportunities. Data Loader automatically relates Opportunities to Accounts. Data Import Wizard can not import all 500 records.

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?. Lightning Data Service handles sharing rules and field-level-security. The with sharing keyword must be used to enforce sharing rules. The isAccessible() method must be used for field-level access checks. Lighting Data Service ignores field-level security.

What is the result of the following code snippet? public void doWork(Account acct){ for (Integer i=0; i <= 200; i++) { insert acct; } }. 0 Accounts are inserted. 201 Accounts are inserted. 200 Accounts are inserted. 1 Accounts is inserted.

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

Which three data types can a SOQL query return? Choose 3 options. Long. Double. Integer. List. sObject.

Denunciar Test