option
Cuestiones
ayuda
daypo
buscar.php

pingarron2

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

Descripción:
pingarron se come un macarron

Fecha de Creación: 2026/03/17

Categoría: Otros

Número Preguntas: 239

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

Which three resources in an Aura component can contain JavaScript functions? Choose 3 answers. A. Renderer. B. Design. C. Controller. D. Style. E. Helper.

A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of Apex tests allowing them to test isolated requirements for various types of Salesforce cases. Which approach can efficiently generate the required data for each unit test?. A. Create test data before Test.startTest() in the unit test. B. Create a mock using the HttpCalloutMock interface. C. Add @isTest(seeAllData=true) at the start of the unit test class. D. Use @testSetup with a void method.

Flow Builder uses an Apex action to provide additional information about multiple Contacts, stored in a custom class, ContactInfo. Which is the correct definition of the Apex method that gets the additional information?. A. @InvocableMethod(label='Additional Info') public static ContactInfo getInfo(Id contactId) { /* implementation */}. B. @InvocableMethod(label='Additional Info') public static List<ContactInfo> getInfo(List<Id> contactIds) { /* implementation */}. C. @InvocableMethod(label='Additional Info') public List<ContactInfo> getInfo(List<Id> contactIds) { /* implementation */}.

A team of many developers work in their own individual orgs that have the same configuration as the production org. Which type of org is best suited for this scenario?. A. Developer Sandbox. B. Full Sandbox. C. Partner Developer Edition. D. Developer Edition.

A developer has an integer variable called maxAttempts. The developer needs to ensure that once maxAttempts is initialized, it preserves its value for the length of the Apex transaction; while being able to share the variable's state between trigger executions. How should the developer declare maxAttempts to meet these requirements?. A. Declare maxAttempts as a member variable on the trigger definition. B. Declare maxAttempts as a private static variable on a helper class. C. Declare maxAttempts as a constant using the static and final keywords. D. Declare maxAttempts as a variable on a helper class.

Management asked for opportunities to be automatically created for accounts with annual revenue greater than $1,000,000. A developer created the following trigger on the Account object to satisfy this requirement. for (Account a: Trigger.new) { if (a.AnnualRevenue > 1000000) { List<Opportunity> oppList = [SELECT Id FROM Opportunity WHERE accountId = :a.Id]; if (oppList.size() == 0) { Opportunity oppty = new Opportunity(Name = a.Name, StageName = 'Prospecting', CloseDate = system.today().addDays(30)); insert Oppty; } } } Users are able to update the account records via the UI and can see an opportunity created for high annual revenue accounts. However, when the administrator tries to upload a list of 179 accounts using Data Loader, it fails with System.Exception errors. Which two actions should the developer take to fix the code segment shown above? Choose 2 answers. A. Query for existing opportunities outside the for loop. B. Check if all the required fields for Opportunity are being added on creation. C. Move the DML that saves opportunities outside the for loop. D. Use Database.query to query the opportunities.

Which exception type cannot be caught?. A. NoAccessException. B. CalloutException. C. LimitException. D. A custom exception.

Which code statement includes an Apex method named updateAccounts in the class AccountController for use in a Lightning web component?. A. import updateAccounts from '@AccountController.updateAccounts';. B. import updateAccounts from '@salesforce/apex/AccountController.updateAccounts';. C. import updateAccounts from '@AccountController';. D. import updateAccounts from '@salesforce/apex/AccountController';.

Where are two locations a developer can look to find information about the status of batch or future methods? Choose two answers. A. Apex Jobs. B. Apex Flex Queue. C. Developer Console. D. Paused Flow Interviews component.

Cloud Kicks has a multi-screen flow that its call center agents use when handling inbound service desk calls. At one of the steps in the flow, the agents should be presented with a list of order numbers and dates that are retrieved from an external order management system in real time and displayed on the screen. What should a developer use to satisfy this requirement?. A. An outbound message. B. An invocable method. C. An Apex controller. D. An Apex REST class.

Which action causes a before trigger to fire by default for Accounts?. A. Renaming or replacing picklists. B. Updating addresses using the Mass Address update tool. C. Importing data using the Data Loader and the Bulk API. D. Converting Leads to Contacts.

What are three capabilities of the <ltng:require> tag when loading JavaScript resources in Aura components? Choose 3 answers. A. Loading scripts in parallel. B. One-time loading for duplicate scripts. C. Loading files from Documents. D. Loading externally hosted scripts. E. Specifying loading order.

Which Apex class contains methods to return the amount of resources that have been used for a particular governor, such as the number of DML statements?. A. OrgLimits. B. Limits. C. Messaging. D. Exception.

Which three statements are accurate about debug logs? Choose 3 answers. A. System debug logs are retained for 24 hours. B. Debug log levels are cumulative, where FINE log level includes all events logged at the DEBUG, INFO, WARN, and ERROR levels. C. Only the 20 most recent debug logs for a user are kept. D. Debug logs can be set for specific users, classes, and triggers. E. The maximum size of a debug log is 5 MB.

When a user edits the Postal Code on an Account, a custom Account text field named "Timezone" must be updated based on the values in a PostalCodeToTimezone__c custom object. Which two automation tools can be used to implement this feature? Choose 2 answers. A. Approval process. B. Fast Field Updates record triggered flow. C. Account trigger. D. Quick actions.

Which two operations affect the number of times a trigger can fire? Choose 2 answers. A. Criteria-based sharing calculations. B. After-save record triggered flow. C. Roll-up summary fields. D. Email messages.

A developer is tasked with building a custom Lightning web component to collect Contact information. The form will be shared among many different types of users in the org. There are security requirements that only certain fields should be edited and viewed by certain groups of users. What should the developer use in their Lightning Web Component to support the security requirements?. A. aura input field. B. force-input-field. C. ui-input-field. D. lightning input field.

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

A developer is working on a project to import data from an external system into Salesforce. The data contains sensitive information that should not be visible to all users in Salesforce. What should the developer do to ensure that the data is secure?. A. Use a third-party tool to encrypt the sensitive data before importing it into Salesforce. B. Use the Apex Data Loader to import the data and write Apex code to handle security and access control. C. Use the Data Import Wizard to import the data and set up field-level security to restrict access to sensitive fields. D. Use the Salesforce CLI to import the data and set up user permissions to restrict access to sensitive data.

A developer created a child Lightning web component nested inside a parent Lightning web component. The parent component needs to pass a string value to the child component. In which two ways can this be accomplished? Choose 2 answers. A. The parent component can use the Apex controller class to send data to the child component. B. The parent component can invoke a public method in the child component. C. The parent component can use a custom event to pass the data to the child component. D. The parent component can use a public property to pass the data to the child component.

Universal Containers wants Opportunities to no longer be editable when it reaches the Closed/Won stage. Which two strategies can a developer use to accomplish this? Choose 2 answers. A. Use an automatically launched Approval Process. B. Use a before-save Apex trigger. C. Use an auto-response rule. D. Use a validation rule.

Universal Containers has an order system that uses an Order Number to identify an order for customers and service agents. Order records will be imported into Salesforce. How should the Order Number field be defined in Salesforce?. A. Indirect Lookup. B. Direct Lookup. C. External ID and Unique. D. Lookup.

Which code displays the contents of a Visualforce page as a PDF?. A. <apex:page renderAs="application/pdf">. B. <apex:page renderAs="pdf">. C. <apex:page contentType="application/pdf">. D. <apex:page contentType="pdf">.

Which annotation exposes an Apex class as a RESTful web service?. A. @RemoteAction. B. @HttpInvocable. C. @RestResource(urlMapping='/myService/*'). D. @AuraEnabled(cacheable=true).

While working in a sandbox, an Apex test fails when run in the Test Runner. However, executing the Apex logic in the Execute Anonymous window succeeds with no exceptions or errors. Why did the method fail in the sandbox test framework but succeed in the Developer Console?. A. The test method does not use System.runAs to execute as a specific user. B. The test method has a syntax error in the code. C. The test method is calling an @future method. D. The test method relies on existing data in the sandbox.

What are two benefits of using declarative customizations over code? Choose 2 answers. A. Declarative customizations cannot generate run time errors. B. Declarative customizations generally require less maintenance. C. Declarative customizations automatically update with each Salesforce release. D. Declarative customizations automatically generate test classes.

A developer needs to confirm that a Contact trigger works correctly without changing the organization's data. What should the developer do to test the Contact trigger?. A. Use Deploy from the VSCode IDE to deploy an 'insert Contact' Apex class. B. Use the New button on the Salesforce Contacts Tab to create a new Contact record. C. Use the Test menu on the Developer Console to run all test classes for the Contact trigger. D. Use the Open Execute Anonymous feature on the Developer Console to run an 'insert Contact' DML statement.

A company has a custom object, Order__c, that has a required, unique external ID field called Order_Number__c. Which statement should be used to perform the DML necessary to insert new records and update existing records in a list of Order__c records using the external ID field?. A. upsert orders;. B. merge orders;. C. upsert orders Order_Number__c;. D. merge orders Order_Number__c;.

A developer wants to send an outbound message when a record meets a specific criteria. Which two features satisfy this use case? Choose 2 answers. A. Flow Builder can be used to check the record criteria and send an outbound message. B. Entitlement Process can be used to check the record criteria and send an outbound message without Apex code. C. Approval Process can be used to check the record criteria and send an outbound message without Apex code. D. Next Best Action can be used to check the record criteria and send an outbound message.

A custom picklist field, Food_Preference__c, exists on a custom object. The picklist contains the following options: 'Vegan', 'Kosher', 'No Preference'. The developer must ensure a value is populated every time a record is created or updated. What is the optimal way to ensure a value is selected every time a record is saved?. A. Write an Apex trigger to ensure a value is selected. B. Mark the field as Required on the field definition. C. Set 'Use the first value in the list as the default value' to true. D. Mark the field as Required on the object's page layout.

A Developer Edition org has five existing accounts. A developer wants to add 10 more accounts for testing purposes. The following code is executed in the Developer Console using the Execute Anonymous window: Account myAccount = new Account(Name = 'MyAccount'); insert myAccount; Integer x = 1; List<Account> newAccounts = new List<Account>(); do { Account acct = new Account (Name = 'New Account ' + x++); newAccounts.add(acct); } while (x < 10); How many total accounts will be in the org after this code is executed?. A. 5. B. 6. C. 10. D. 15.

Universal Containers hires a developer to build a custom search page to help users find the Accounts they want. Users will be able to search on Name, Description, and a custom comments field. Which consideration should the developer be aware of when deciding between SOQL and SOSL? Choose 2 answers. A. SOSL is faster for text searches. B. SOQL is faster for text searches. C. SOSL is able to return more records. D. SOQL is able to return more records.

Which scenario is valid for execution by unit tests?. A. Load data from a remote site with a callout. B. Execute anonymous Apex as a different user. C. Set the created date of a record using a system method. D. Generate a Visualforce PDF with getContentAsPDF().

A developer created this Apex trigger that calls MyClass.myStaticMethod: trigger myTrigger on Contact (before insert) { MyClass.myStaticMethod(trigger.new); } The developer creates a test class with a test method that calls MyClass.myStaticMethod directly, resulting in 81% overall code coverage. What happens when the developer tries to deploy the trigger and two classes to production, assuming no other code exists?. A. The deployment passes because the Apex code has the required >75% code coverage. B. The deployment passes because both classes and the trigger were included in the deployment. C. The deployment fails because the Apex trigger has no code coverage. D. The deployment fails because no assertions were made in the test method.

A developer needs to allow users to complete a form on an Account record that will create a record for a custom object. The form needs to display different fields depending on the user's job role. The functionality should only be available to a small group of users. Which three things should the developer do to satisfy these requirements? Choose 3 answers. A. Add a Dynamic Action to the Users' assigned Page Layouts. B. Create a Custom Permission for the users. C. Create a Lightning web component. D. Create a Dynamic form. E. Add a Dynamic Action to the Account Record Page.

A developer created a trigger on the Account object. While testing the trigger, the developer sees the error message 'Maximum trigger depth exceeded'. What could be the possible causes?. A. The trigger does not have sufficient code coverage. B. The developer does not have the correct user permission. C. The trigger is too long and should be refactored into a helper class. D. The trigger is getting executed multiple times.

Universal Containers decides to use purely declarative development to build out a new Salesforce application. Which two options can be used to build out the business logic layer for this application? Choose 2 answers. A. Remote Actions. B. Validation Rules. C. Batch Jobs. D. Record Triggered Flow.

Universal Containers needs to create a custom user interface component that allows users to enter information about their accounts. The component should be able to validate the user input before saving the information to the database. What is the best technology to create this component?. A. Lightning Web Components. B. VUE JavaScript framework. C. Flow. D. Visualforce.

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

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

A developer created these three Rollup Summary fields in the custom object, Project__c: Total_Timesheets__c Total_Approved_Timesheets__c Total_Rejected_Timesheet__c the developer is asked to create a new field that shows the ratio between rejected and approved timesheets for a given project. Which should the developer use to implement the business requirement in order to minimize maintenance overhead?. A. Roll-up summary field. B. Formula field. C. Apex trigger. D. Record-triggered flow.

What are three ways for a developer to execute tests in an org? Choose 3 answers. A. Tooling API. B. Bulk API. C. Setup Menu. D. Metadata API. E. Salesforce DX.

A developer must create a CreditCardPayment class that provides an implementation of an existing Payment class. public virtual class Payment { public virtual void makePayment(Decimal amount) { /*implementation*/ } } Which is the correct implementation?. A. public class CreditCardPayment implements Payment { public virtual void makePayment(Decimal amount) { /*implementation*/ } }. B. public class CreditCardPayment implements Payment { public override void makePayment(Decimal amount) { /*implementation*/ } }. C. public class CreditCardPayment extends Payment { public override void makePayment(Decimal amount) { /*implementation*/ } }. D. public class CreditCardPayment extends Payment { public virtual void makePayment(Decimal amount) { /*implementation*/ } }.

A developer is creating a Lightning web component to show a list of sales records. The Sales Representative user should be able to see the commission field on each record. The Sales Assistant user should be able to see all fields on the record except the commission field. How should this be enforced so that the component works for both users without showing any errors?. A. Use WITH SECURITY_ENFORCED in the SOQL that fetches the data for the component. B. Use Lightning Data Service to get the collection of sales records. C. Use Lightning Locker Service to enforce sharing rules and field-level security. D. Use Security.stripInaccessible to remove fields inaccessible to the current user.

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 answers. A. 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. B. Create an after update trigger on the Opportunity object that calls a helper method using @future(callout=true) to perform the HTTP REST callout. C. 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. D. 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.

A developer is implementing an Apex class for a financial system. Within the class, the variables 'creditAmount' and 'debitAmount' should not be able to change once a value is assigned. In which two ways can the developer declare the variables to ensure their value can only be assigned one time? Choose 2 answers. A. Use the static keyword and assign its value in a static initializer. B. Use the static keyword and assign its value in the class constructor. C. Use the final keyword and assign its value in the class constructor. D. Use the final keyword and assign its value when declaring the variable.

A developer created a trigger on the Account object and wants to test if the trigger is properly bulkified. The developer decides that the trigger should be tested with 200 account records with unique names. What two things should be done to create the test data within the unit test with the least amount of code? Choose 2 answers. A. Use the @isTest(isParallelExecution) annotation in the test class. B. Use the @isTest(@SeeAllData=true) annotation in the test class. C. Create a static resource containing test data. D. Use Test.loadData to populate data in your test methods.

What are two use cases for executing Anonymous Apex code? Choose 2 answers. A. To delete 15,000 inactive Accounts in a single transaction after a deployment. B. To schedule an Apex class to run periodically. C. To add unit test code coverage to an org. D. To run a batch Apex class to update all Contacts.

Universal Containers has a support process that allows users to request support from its engineering team using a custom object, Engineering_Support__c. Users should be able to associate multiple Engineering_Support__c records to a single Opportunity record. Additionally, aggregate information about the Engineering_Support__c records should be shown on the Opportunity record. Which relationship field should be implemented to support these requirements?. A. Master-detail field from Opportunity to Engineering_Support__c. B. Lookup field from Opportunity to Engineering_Support__c. C. Master-detail field from Engineering_Support__c to Opportunity. D. Lookup field from Engineering_Support__c to Opportunity.

Which three Salesforce resources can be accessed from a Lightning web component? Choose 3 answers. A. Content asset files. B. Third-party web components. C. SVG resources. D. Static resources. E. All external libraries.

If Apex code executes inside the execute() method of an Apex class when implementing the Batchable interface, which two statements are true regarding governor limits? Choose 2 answers. A. The Apex governor limits will use the asynchronous limit levels. B. The Apex governor limits are reset for each iteration of the execute() method. C. The Apex governor limits cannot be exceeded due to the asynchronous nature of the transaction. D. The Apex governor limits are omitted while calling the constructor of this Apex class.

Which two settings must be defined in order to update a record of a junction object? Choose 2 answers. A. Read/Write access on the secondary relationship. B. Read/Write access on the primary relationship. C. Read/Write access on the junction object. D. Read access on the primary relationship.

A developer is integrating with a legacy on-premise SQL database. What should the developer use to ensure the data being integrated is matched to the right records in Salesforce?. A. External Object. B. External ID field. C. Formula field. D. Lookup field.

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?. A. Add a new Get Records element. B. Add a new Roll Back Records element. C. Add a new Create Records element. D. Add a new Update Records element.

How is a controller and extension specified for a custom object named "Notice" on a Visualforce page?. A. <apex:page controller="Notice__c" extension="myControllerExtension">. B. <apex:page controller="Notice__c" extensions="myControllerExtension">. C. <apex:page standardController="Notice__c" extensions="myControllerExtension">. D. <apex:page="Notice" extends="myControllerExtension">.

A developer is creating an app that contains multiple Lightning web components. One of the child components is used for navigation purposes. When a user clicks a button called Next in the child component, the parent component must be alerted so it can navigate to the next page. How should this be accomplished?. A. Create a custom event. B. Call a method in the Apex controller. C. Update a property on the parent. D. Fire a notification.

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?. A. 0. B. 1. C. 2. D. 3.

A developer created a new after insert trigger on the Lead object that creates Task records for each Lead. After deploying to production, an existing outside integration that inserts Lead records in batches to Salesforce is occasionally reporting total batch failures being caused by the Task insert statement. This causes the integration process in the outside system to stop, requiring a manual restart. Which change should the developer make to allow the integration to continue when some records in a batch cause failures due to the Task insert statement, so that manual restarts are not needed?. A. Use a try-catch block after the insert statement. B. Remove the Apex class from the integration user's profile. C. Use the Database method with allOrNone set to false. D. Deactivate the trigger before the integration runs.

Which two events need to happen when deploying to a production org? Choose 2 answers. A. All custom objects must have visibility set to a value other than in Development. B. All Apex code must have at least 75% test coverage. C. All triggers must have some test coverage. D. All Visual flows must have at least 1% test coverage.

In the following example, which sharing context will myMethod execute when it is invoked? public class myClass { public void myMethod() { /* implementation */ } }. A. Sharing rules will be enforced for the running user. B. Sharing rules will be inherited from the calling context. C. Sharing rules will not be enforced for the running user. D. Sharing rules will be enforced by the instantiating class.

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.

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

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

A software company uses the following objects and relationships: - Case: to handle customer suppoort 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 a Defect__c have Private organization-wide defaults. What should be done to share a specific Case_Defect__c record with a user?. Share the Case_Defect__c record. Share the parent Defect__c record. Share the parent Case record. Share the parent Case and Defect__c record.

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

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

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

A developer is alerted to an issue with a custom Apex trigger that is causing record to be duplicated. What is the most appropiate debugging approach to troubleshoot the issue?. Disable the trigger in production and test to see if the issue stills occurs. Review the Historical Event logs to identify the source of the issue. Add system.debug statemets to the code to track the execution flow and identify the issue. Use the Apex Interactive Debugger to step through the code and identify the issue.

Which two characteristics are true for Lightning Web Component custom events?. By default a custom event only propagates to its immediate container and to its immediate child component. By default a custom event only propagates to it's immediate container. Data may be passed in the payload of a custom event using a property called detail. Data may be passed in the payload of a custom event using @wire decorated properties.

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 accesible 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 accesible outside the package namespace?. Declare the class as global an duse the public access modifier on the method. 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.

What should a developer do to check the code coverage of a class after running all tests?. View the Cass Test Percentage tab on the Apex Class list view in Salesforce Setup. Select and run the class on the Apex Test Execution page in the Developer Console. View the Code Coverage column in the list view on the Apex Classes page. View the code coverage percentage for the class using the Overall Code Coverage panel in the Developer Console Tests Tab.

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

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

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;. static decimal DELIVERY_MULTIPLIER = 4.15;.

Developers at Universal Containers (UC) use verison control to share their code changes, but they notice that when they deploy their code to different environmets 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 Toolkit. Vs Code. Salesforce CLI. Developer Console.

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

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?. aura-flow. lightning:flow. aura:flow. lightning-flow.

What is an example of a polymorphic lookup field in Salesforce?. 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. The LeadId and ContactId fields on the standard Campaign Member object. The ParentId field on the standard Account object.

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 accesible to the currently logged in user are displayed?. Use the without sharing keyword. Use the with_sharing keyword. Use the inherited sharing keyword. Use the WITH SECURITY_ENFORCED clause withing the SOQL.

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

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 Trainer__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, (SELECT Id FROM Trainers__c) FROM Gym__c WHERE Name = 'Viridian City Gym'. SELECT Id FROM Trainer__c WHERE Gym__r.Name = 'Viridian City Gym'.

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

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 a developer should implement and ensure succesful execution of the method?. Avoid using variables as query filters. Avoid returning an empty List of records. Avoid performing queries inside for loops. Avoid executing queries without a limit clause.

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

A custom Visualforce controller calls the ApexPags.addMessage() method, but no messages are rendering on the page. <apex:pageMessage severity-"info"/>. <apex:facet name="messages"/>. <apex:pageMessages/>. <apex:message for="info"/>.

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

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 RequesTrigger on Request__c(after insert){ RequestLogic.validateRecords(trigger.new); }. trigger RequestTrigger on Request__c (before insert){ RequestLogic.validateRecords(trigger.new); }.

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

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

The following code snippet is executed by a Lightning web component in an environment with more than 2000 lead records: @AuraEnabled public void static updateLeads(){ for(Lead thisLead : [SELECT origin__c FROM Lead]){ thisLead.LeadSource = thisLead.origin__c; update thisLead; } } Which gobernot limit will likely be exceeded within the Apex transaction?. Total number of records retrieved by SOQL queries. Total number of SOQL queries issued. Total number of records processed as a result of DML statements.

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 writter to the debug log?. 0. 1. 2. 3.

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

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

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 htat 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?. Incorporate the Salesforce Lightning Design System CSS stylesheet into the JavaScript applications. Enable Available for Lightning Experience, Lightning Communities, and the mobiel app on Visualforce pages used by the custom application. Set the attribute enableLightning to true in the definition. Rewrite all Visualforce pages as Lightning components.

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

Given the following Apex statement: Account myAccount = [SELECT Id, Name FROM Account]; What occurs when more than one Account is return 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 variable, myAccount, is automatically cast to the List data type. The first Account returned is assigned to myAccount.

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

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

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

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 fo an environment that has over 10000 Case records?. The try-catch block will handle any DML exceptions thrown. The try-catch block will handle exceptions thrown by governor limits. The transaction will fail due to exceeding the governor limit. The transaction will succeed and changes will be committed.

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. Unit tests must have calls to the System.assert method. At least 75% of Apex code must be covered by unit tests.

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

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

Which two actions may cause triggers to fire?. 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 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 scapeSingleQuotes method to sanitize the parameter before its use. Use a regular expression on the parameter to remove special characters. Use variable binding and replace the dynamic query with a static SOQL. Use the @ReadOnly annotation and the with sharing keyword on the class.

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

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

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

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

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

A developer wants to import 500 Opportunity records into a sadbox. Why should the developer choose to use Data Loader instead of Data Import Wizard?. Data import Wizard can not import all 500 records. Data Loader runs from the developer's browser. Data Import Wizard does not support Opportunities. Data Loader Automatically relates Opportunities to Accounts.

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

A developer is asked to write helper methods that create test data for unit tests 01: public TestUtils{ 02: 03: public static Account createAccount(){ Account act = new Account(); //set some fields on act return act; } } What should be changed in the TestUtils class so that its methods are only usable by unit test methods?. Add @isTest above line 03. Change public to private on line 01. Remove static from line 03. Add @isTest above line 01.

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> seach(String term){}. @AuraEnabled(cacheable=false) public static List<Opportunity> seach(String term){}. @AuraEnabled(cacheable=false) public List<Opportunity> seach(String term){}. @AuraEnabled(cacheable=true) public List<Opportunity> seach(String term){}.

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

Which three steps allow a custom Scalable Vector Graphic(SVG) to be included in a Lightning web component? Choose 3 answers. 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. Import the SVG as a content asset file. Upload the SVG as a static resource.

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

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

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

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

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.

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

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.

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

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.

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'):.

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

Denunciar Test