EMT Practice Test

1. Question Content...


Question List

Question1: A Salesforce Administrator is creating a record-triggered flow. When certain criteria are met, the flow must call an Apex method to execute complex validation involving several types of objects.
When creating the Apex method, which annotation should a developer use to ensure the method Can be used within the flow?

Question2: What should a developer use to obtain the Id and Name of all the Leads. Accounts, and Contacts that hove the company name "Universal Containers"?

Question3: Universal Containers recently transitioned from Classic to Lighting Experience. One of its business processes requires certain value from the opportunity object to be sent via HTTP REST callout to its external order management system based on a user-initiated action on the opportunity page. Example values are as follow Name Amount Account Which two methods should the developer implement to fulfill the business requirement? (Choose 2 answers)

Question4: A company has a custom object, Sales, }_Help_Request__c, that has a Lookup relationship to Opportunity. The Seles Help Request__c has a mumber field, Number_ct_Hours__c, that represents the amount of time spent on the Sales_Help Request__C.
A developer is tasked with creating a field, total_Hour2__c, on Opportunity that should be the sum of all of the Number_of_Hours_c values for the Sales_Help_Request__c records related to that Opportunity.
What should the developer use to implement this?

Question5: What are two use cases for executing Anonymous Apex code? Choose 2 answers

Question6: What are three ways for a developer to execute tests in an org? Choose 3.

Question7: 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?

Question8: Which action may cause triggers to fire?

Question9: Which three steps allow a custom SVG to be included in a Lightning web component? Choose 3 answers

Question10: Which three code lines are required to create a Lightning component on a Visualforce page? Choose 3 answers

Question11: A developer observes that an Apex test method fails in the Sandbox. To identify the issue, the developer copies the code inside the test method and executes it via the Execute Anonymous tool in the Developer Console. The code then executes with no exceptions or errors. Why did the test method fail in the sandbox and pass in the Developer Console?

Question12: Which two statements are true about using the @testSetup annotation in an Apex test class?
Choose 2 answers

Question13: For which three items can a trace flag be configured?
Choose 3 answers

Question14: What should a developer do to check the code coverage of a class after running all tests?

Question15: The sales management team at Universal Container requires that the Lead Source field of the Lead record be populated when a.. converted.
What should be done to ensure that a user populates the Lead Source field prior to converting a Lead?

Question16: A developer has an integer variable called maxAttempts. The developer meeds to ensure that once maxAttempts is initialized, it preserves its value for the lenght 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?

Question17: The following code snippet is executed by a Lightning web component in an environment with more than 2,000 lead records:

Which governor limit will likely be exceeded within the Apex transaction?

Question18: Which scenario is valid for execution by unit tests?

Question19: Which two events need to happen when deploying to a production org? Choose 2 answers

Question20: Cloud kicks has a muli-screen flow 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 number and dates that are retrieved from an external odrer management system in real time and displayed on the screen.
What shuold a developer use to satisfy this requirement?

Question21: A company wants to implement a new call center process for handling customer service calls. It requires service reps to ask for the caller's account number before proceeding with the rest of their call script.
Following best practices, what is the optimal approach to satisfy this requirmrnt?

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

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

Question23: An org tracks customer orders on an Order object and the items of an Order on the Line Item object. The Line Item object has a MasterDetail relationship to the order object. A developer has a requirement to calculate the order amount on an Order and the line amount on each Line item based on quantity and price.
What is the correct implementation?

Question24: Universal Containers stores the availability date on each Line Item of an Order and Orders are only shipped when all of the Line Items are available. Which method should be used to calculate the estimated ship date for an Order?

Question25: 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 own7

Question26: A developer created this Apex trigger that calls MyClass,myStartmethod:

The developer creates a test method that calls MyClase,myStartmethod directly, resulting in 81% overall code coverage.
What happens wtier the developer tries to deploy the ... and two classes to production, assuming no other code exists?

Question27: How should a developer write unit tests for a private method in an Apex class?

Question28: Universal Container uses Service Cloud with a custom field, stage_c, on the Case object.
Management wants to send a follow-up email reminder 6 hours after the stage_c field is set to '';Waiting on customer'' The .... Administrator wants to ensure the solution used is bulk safe.
Which two automation tools should a developer recommend to meet these business requirements?
Choose 2 answers

Question29: Refer to the code snippet below:

When a Lightning web component is rendered, a list of apportunities that match certain criteria shopuld be retrievved from the database and displayed to the end user.

Choose 3 answer

Question30: A developer wants to invoke on outbound message when a record meets a specific criteria.
Which three features satisfy this use case?
Choose 3 answer

Question31: 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 all Contact records where the related Account Industry is 'Technology' while also retrieving the contact's Job_Application__c records.
Based on the object's relationships, what is the most efficient statement to retrieve the list of contacts?

Question32: Universal Containers has a Visualforce page that displays a table of every Container_c. being ....... Is falling with a view state limit because some of the customers rent over 10,000 containers.
What should a developer change about the Visualforce page to help with the page load errors?

Question33: How does the Lightning Component framework help developers implement solutions faster?

Question34: A developer created a child Lightning web component nested inside a parent Lightning web component, parent component needs to pass a string value to the child component.
In which two ways can this be accomplished?
Choose 2 answers

Question35: A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violation to the user. How can the developer make sure that validation rule violations are displayed?

Question36: What should be used to create scratch orgs?

Question37: A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple subjects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URL.
Which three statements are useful inside the unit test to effectively test the custom controller?
Choose 3 answers

Question38: Universal Containers decides to use exclusively declarative development to build out a new Salesforce application. Which three options should be used to build out the database layer for the application? Choose 3 answers

Question39: A developer Is asked to create a Visualforce page that lists the contacts owned by the current user. This component will be embedded In a Lightning page.
Without writing unnecessary code, which controller should be used for this purpose?

Question40: A developer created a trigger on the Account object and wants to test if the trigger is properly bulklfield. The developer team decided 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 developer created a trigger on the Account object and wants to test if the trigger is properly bulklfield. The developer team decided 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

Question41: Which two sfdx commands can be used to add testing data to a Developer sandbox?

Question42: A developer is creating a test coverage for a class and needs to insert records to validate functionality. Which method annotation should be used to create records for every method in the test class?

Question43: A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system. Whithin 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? Choose 2 answers

Question44: Which three statements are true regarding custom exceptions in Apex? (Choose three.)

Question45: In terms of the MVC paradigm, what are two advantages of implementing the layer of a Salesforce application using Aura Component-based development over Visualforce? Choose 2 answers

Question46: A developer needs to implement a custom SOAP Web Service that is used by an external Web Application. The developer chooses to Include helper methods that are not used by the Web Application In the Implementation of the Web Service Class.
Which code segment shows the correct declaration of the class and methods?

Question47: 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?

Question48: 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?

Question49: 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? ns

Question50: A developer is debugging the following code to determinate why Accounts are not being created Account a = new Account(Name = 'A'); Database.insert(a, false); How should the code be altered to help debug the issue?

Question51: A developer wrote Apex code that calls out to an external system. How should a developer write the test to provide test coverage?

Question52: What is the result of the following code?

Question53: n org has an existing flow that creates an Opportunity with an Update Records element. A developer must update the flow to aiso create a 'Contact and store the created Contact's 1D on the Opportunity.
Which update must the developer make in the flow?

Question54: A developer at Universal Containers is taked with implementing a new Salesforce application that bwill be maintained completely by their company's Salesforce admiknistrator.
Which two options should be considered for buildig out the business logic layerof the application?
Chosse 2 answer

Question55: What are two ways for a developer to execute tests in an org?

Question56: 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 levelpermissions on salary__C?

Question57: What should a developer do to check the code coverage of a class after running all tests?

Question58: What are three ways for 2 developer to execute tests in an org? Choose 3 answers

Question59: A developer writes a trigger on the Account object on the before update event that increments a count field. A workflow rule also increments the count field every time that an Account is created or updated. The field update in the workflow rule is configured to not re-evaluate workflow rules.
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?

Question60: 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?

Question61: 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?

Question62: Which two are best practices when it comes to component and application event handling? (Choose two.)

Question63: An org has an existing Flow that creates an Opportunity with an Update Records element. A developer update the Flow to also create a Contact and store the created Contact's ID on the Opportunity.
Which update should the developer make in the Flow?

Question64: Universal Container(UC) wants to lower its shipping cost while making the shipping process more efficient. The Distribution Officer advises UC to implement global addresses to allow multiple Accounts to share a default pickup address. The Developer is tasked to create the supporting object and relationship for this business requirement and uses the Setup Menu to create a custom object called "Global Address". Which field should the developer ad to create the most efficient model that supports the business need?

Question65: A developer considers the following snippet of code:

Based on this code, what is the value of x?

Question66: Which three resources in an Azure Component can contain JavaScript functions?

Question67: Assuming that naze is 8 String obtained by an <apex:inpotText> tag on 8 Visualforce page, which two SOQL queries performed are safe from SOQL injection?
'Choose 2 answers

Question68: Which Lightning code segment should be written to declare dependencies on a Lightning component, c:accountList, that is used in a Visualforce page?

Question69: What are three capabilities of the <ltng : require> tag when loading JavaScript resources in Aura components?
Choose 3 answers

Question70: If apex code executes inside the execute() method of an Apex class when implementing the Batchable interface, which statement are true regarding governor limits? Choose 2 answers

Question71: As part of a data cleanup strategy, AW Computing wants to proactively delete associated opportunity records when the related Account is deleted.
Which automation tool should be used to meet this business requirement?

Question72: In the Lightning UI, where should a developer look to find information about a Paused Flow Interview?

Question73: 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 datadase.
Which two techniques should the developer implement as a best practice to ensure transaction control and avoid exceeding governor limits?
Choose 2 answers

Question74: 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?

Question75: What are three characteristics of change set deployments?
Choose 3 answers

Question76: Ursa Major Solar has a custom object, serviceJob-o, with an optional Lookup field to Account called partner-service-Provider_c.
The TotalJobs-o field on Account tracks the total number of serviceJob-o records to which a partner service provider Account is related.
What is the most efficient way to ensure that the Total job_o field kept up to data?