EMT Practice Test

1. Question Content...


Question List

Question1: Considering the following code snippet:

When the code executes, a DML exception is thrown.
How should a developer modify the code to ensure exceptions are handled gracefully?

Question2: Where are two locations a developer can look to find information about the status of batch or future methods?
Choose 2 answers

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

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

Question5: Flow Builder uses an Apex action to provide additional information about multiple Contacts, stored in a custom class, Con Which is the correct definition of the Apex method that gets the additional information?

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

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

Question8: What does the Lightning Component framework provide to developers?

Question9: Which code statement includes an Apex method named updateaccounts in the class accountcontreoller for use in a Lightning web component?

Question10: A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces.

Which is the correct implementation?

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

Question12: Refer to the following Apex code:

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

Question13: Which two operations affect the number of times a trigger can fire?
Choose 2 answers

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

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

Question16: A developer created a trigger on the Account object and wants to test if the trigger is properly bulkified. 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

Question17: A developer created a Visualforce page and custom controller to display the account type field as shown below.
Custom controller code:

Visualforce page snippet:

what should the developer do to correct the problem?

Question18: A developer must perform a complex SOQL query that joins two objects in a Lightning component.
How can the Lightning component execute the query?

Question19: A developer needs to allow users to complete a form on an Account record that will create 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

Question20: Since Aura application events follow the traditional publish- subscribe model, which method is used to fire an event?

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

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

Question23: A developer considers the following snippet of code:

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

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

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

Question26: A developer is asked to write helper methods that create test data for unit tests.

What should be changed in the TestUtils class so that its methods are only usable by unit test methods?

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

Question28: How many Accounts will be inserted by the following block of code?

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

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

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

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

Question33: Which two characteristics are true for Lightning Web Component custom events? Choose 2 answers

Question34: How can a developer check the test coverage of autolaunched Flows before deploying them in a change set?

Question35: Which two are best practices when it comes to Aura component and application event handling?
Choose 2 answers

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

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

Question38: Assuming that name is a String obtained by an <apex:inpucText> tag on a Visualforce page, which two SOQL queries performed are safe from SOQL injection? Choose 2 answers

Question39: 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 salarv < field functions as a currency Input and is only viewable and editable by users that have the correct field level permissions on salary _c?

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

Question41: Which three data types can a SOQL query return?
Choose 3 answers

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

Question43: What are two characteristics related to formulas?
Choose 2 answers

Question44: What should a developer use to fix a Lightning web component bug in a sandbox?

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

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

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

Question48: When using Salesforce DX, what does a developer need to enable to create and manage scratch orgs?

Question49: What is an example of a polymorphic lookup field in Salesforce?

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

Question51: Universal Containers decided to transition from Classic to Lightning Experience. They asked a developer to replace a JavaScript button that was being used to create records with prepopulated values.
What can the developer use to accomplish this?

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

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

Question54: Which two settings must be defined in order to update a record of a junction object? Choose 2 answers

Question55: Which annotation exposes an Apex class as a RESTful web service?

Question56: What are two benefits of using External IDs? Choose 2 answers

Question57: In the following example, which sharing context will myMethod execute when it is invoked?

Question58: A developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunitylLineltem trigger.
Which method allows access to the price book?

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

Question60: Which three statements are accurate about debug logs?
Choose 3 answers

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

Question62: Universal Containers wants a list button to display a Visualforce page that allows users to edit multiple records.
Which Visualforce feature supports this requirement?

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

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

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

Question66: Which three Salesforce resources can be accessed from a Lightning web component?
Choose 3 answers

Question67: A developer Is designing a new application on the Salesforce platform and wants to ensure it can support multiple tenants effectively.
Which design framework should the developer consider to ensure scalability and maintainability?

Question68: What Is the result of the following code?

Question69: Which two are phases in the Aura application event propagation framework?
Choose 2 answers

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

Question71: 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? Choose 2 answers

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

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

Question74: A developer identifies the following triggers on the Expense__c object:

The triggers process before delete, before insert, and before update events respectively.
Which two techniques should the developer implement to ensure trigger best practices are followed?
Choose 2 answers

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

Question76: Given the following Apex statement:

What occurs when more than one Account is returned by the SOQL query?

Question77: Which statement generates a list of Leads and Contacts that have a field with the phrase 'ACME'?

Question78: Universal Containers (UC) processes orders in Salesforce in a custom object, ord=xr <. They also allow sales reps to upload CSV files with thousands of orders at a time.
A developer is tasked with integrating orders placed in Salesforce with UC's enterprise resource planning (ERP) system.
After the status for an order__ c is first set to 'Placed', the order information must be sent to a REST endpoint in the ERP system that can process one order at a time.
What should the developer implement to accomplish this?

Question79: Consider the following code snippet for a Visualforce page that is launched using a Custom Button on the Account detail page layout.

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?

Question80: If Apex code executes inside the =x=cuz=() method of an Apex class when implementing the Batchable interface, which two statements are true regarding governor limits?
Choose 2 answers