EMT Practice Test

1. Question Content...


Question List

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

Question2: Refer to the following code snippet for an environment has more than 200 Accounts belonging to the Technology' industry:

When the code execution, which two events occur as a result of the Apex transaction?
When the code executes, which two events occur as a result of the Apex transaction?
Choose 2 answers

Question3: 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

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

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

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

Question7: Refer to the following code snippet for an environment that has more than 200 Accounts belonging to the Technology' industry:

which three statements are accurate about debug logs?
Choose 3 answers

Question8: 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

Question9: Universal Containers implemented a private sharing model for the Account object. A custom Account search tool was developed with Apex to help sales representatives find accounts that match multiple criteria they specify. Since its release, users of the tool report they can see Accounts they do not own. What should the developer use to enforce sharing permission for the currently logged-in user while using the custom search tool?

Question10: Given the following code snippet, that is part of a custom controller for a Visualforce page:

In which two ways can the try/catch be enclosed to enforce object and field-level permissions and prevent the DML statement from being executed if the current logged-in user does not have the appropriate level of access? Choose 2 answers

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

Question12: What is the result of the following code?

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

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

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

Question16: An Apex method, getAccounts, that returns a list of Accounts given a searchTern, is available for Lightning Web Components to use.
What is the correct definition of a Lightning Web Component property that uses the getAccounts method?

Question17: A business has a proprietary Order Management System (OMS) that creates orders from their website and fulfills the orders. When the order is created in the OMS, an integration also creates an order record in Salesforce and relates it to the contact as identified by the email on the order. As the order goes through different stages in the OMS, the integration also updates It in Salesforce. It is noticed that each update from the OMS creates a new order record in Salesforce.
Which two actions will prevent the duplicate order records from being created in Salesforce?
Choose 2 answers

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

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

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

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

Question22: How can a developer check the test coverage of active Process Builder and Flows deploying them in a Changing Set?

Question23: 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

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

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

Question26: Refer to the following Apex code:

What is the value of x when it is written to the debug log?

Question27: When a user edits the Postal Code on an Account, a custom Account text field named ''Timezone'' must be updated based on the values another custom object object called.
What is the optimal way to Implement this feature?

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

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

Question30: A developer considers the following snippet of code:

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

Question31: 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

Question32: A custom picklist field, Food_Preference__c, exist 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 most efficient way to ensure a value is selected every time a record is saved?

Question33: A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an Orderltem 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 Orderltem records to a new Order record?

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

Question35: When importing and exporting data into Salesforce, whichtwo statements are true?
Choose 2 answers

Question36: 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.
What should be built to implement this feature?

Question37: A developer wrote an Apex method to update a list of Contacts and wants to make it available for use by Lightning web components.
Which annotation should the developer add to the Apex method to achieve this?

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

Question39: A developer is writing tests for a class and needs to insert records to validate functionality.
Which annotation method should be used to create record for every method in the test class?

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

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

Question42: A developer needs to have records with specific field values in order to test a new Apex class.
What should the developer do to ensure the data is available to the test?

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

Question44: 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 it's trainers?

Question45: The Account object in an organization has a master detail relationship to a child object called Branch. The following automations exist:
* Rollup summary fields
* Custom validation rules
* Duplicate rules
A developer created a trigger on the Account object.
What two things should the developer consider while testing the trigger code?
Choose 2 answers

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

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

Question48: Which action causes a before trigger to fire by default for Accounts?

Question49: A development team wants to use a deployment script lo automatically deploy lo a sandbox during their development cycles.
Which two tools can they use to run a script that deploys to a sandbox?
Choose 2 answers

Question50: A developer is creating a Lightning web component to showa 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?

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

Question52: Universal Containers hires a developer to build a custom search page to help user- 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

Question53: The values 'High', 'Medium', and 'Low' are Identified as common values for multiple picklist across different object. What is an approach a developer can take to streamline maintenance of the picklist and their values, while also restricting the values to the ones mentioned above?

Question54: Which statement describes the execution order when trigger are associated to the same object and event?

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

Question56: 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 click a button called.. component, the parent component must be alerted so it can navigate to the next page.
How should this be accomplished?

Question57: What can be used to override the Account's standard Edit button for Lightning Experience?

Question58: A developer must implement a CheckPaymentProcessor class that provides check processing payment capabilities that adhere to what defined for payments in the PaymentProcessor interface. public interface PaymentProcessor { void pay(Decimal amount); } Which is the correct implementation to use the PaymentProcessor interface class?

Question59: Universal Container* decides to use purely declarative development to build out a new Salesforce application.
Which two options can be used to build out logic layer for this application?
Choose 2 answer

Question60: 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 ogject.
Which two automationtools can be used to implement this feature?
Choose 2 answers

Question61: Universal Container is building a recruiting app with an Applicant object that stores information about an individual person that represents a job. Each application may apply for more than one job.
What should a developer implement to represent that an applicant has applied for a job?

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

Question63: What are two ways a developer can get the status of an enquered job for a class that queueable interface?
Choose 2 answers

Question64: What should a developer use to script the deployment and unit test execution as part of continuous integration?

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

Question66: For which three items can 2 trace flag be configured?
Choose 3 answers

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

Question68: 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 Defector to represent that a defect Is a customer issue What should be done to share a specific Case-Defect_c record with a user?