EMT Practice Test

1. Question Content...


Question List

Question1: What is the transaction limit on the number of "sendEmail" method calls?

Question2: A developer is asked to build a solution that will automatically send an email to the Customer when an Opportunity stage changes. The solution must scale to allow for 10,000 emails per day. The criteria to send the email should be evaluated after all Workflow Rules have fired. What is the optimal way to accomplish this?

Question3: How can Apex be used with Visual Workflow?

Question4: A developer wants to create a Visualforce page that allows a user to search for a given account by Name. If the account is found, the account details should be populated on screen. If no account is found, an error message should be displayed to the user.
How can this be accomplished? (Choose two.)

Question5: Consider the controller code above that is called from a Lightning component and returns data wrapped in a class.

Consider the controller code above that is called from a Lightning component and returns data wrapped in a class.
The developer verified that the Queries return a single record each and there is error handing in the Lightning component, but the component is not getting anything back when calling the controller getSomeData().
What is wrong?

Question6: How can the DISTANCE and GEOLOCATION functions be used i|n SOQL queries? (Choose two.)

Question7: Given the following containment hierarchy:

What is the correct way to communicate the new value of a property named ''passthrough'' to my-parent component if the property is defined within my-child-component?
A)

B)

C)

D)

Question8: In a VisualForce page with a VisualForce component that has rendered set to false when the page loads, how can a developer ensure it will show on a re-render?

Question9: When developing a Lightning web component, which setting displays lightning-layout-items in one column on small devices, such as mobile phones, and in two columns on tablet-size and desktop-size screens?

Question10: A developer has created a Visualforce page that uses a third-party JavaScript framework. The developer has decided to supply data to the JavaScript functions using JavaScript Remoting for Apex Controllers.
What is the correct syntax to declare a remote method in Apex? (Choose two.)

Question11: A developer is building a Lightning web component that retrieves data from Salesforce and assigns it to the record property.

What must be done in the component to get the data from Salesforce?
A)

B)

C)

D)

Question12: What is a recommended practice with regard to the Apex CPU limit? (Choose two.)

Question13: A developer has a page with two extensions overriding the Standard controller for Case.

What will happen when a user clicks the command button?

Question14: A developer created and tested a Visualforce page in their developer sandbox, but now receives reports that users are encountering ViewState errors when using it in Production. What should the developer ensure to correct these errors?

Question15: A company wants to build a custom Lightning Component that will display a specified Account Field Set and that can only be added to the Account record page. Which design resource configuration should be used?

Question16: A developer must create a custom pagination solution for accessing approximately 2000 records and displaying 50 records on each page. Data from Salesforce will be accessed via an API and not via Apex.
How can the developer meet these requirements? (Choose two.)

Question17: A developer is using a third-party JavaScript library to create a custom user interface in Visualforce. The developer needs to use JavaScript to get data from a controller method in response to a user action.
How can the developer accomplish this?

Question18: A developer Is asked to develop a new AppExthange application. A feature of the program creates Survey records when a Case reaches a certain stage and Is of a certain Record Type. This feature needs to be configurable, as different Salesforce instances require Surveys at different times. Additionally, the out-of-the-box AppExchange app needs to come with a set of best practice settings that apply to most customers.
What should the developer use to store and package the custom configuration settings for the app?

Question19: A company represents their customers as Accounts in Salesforce. All customers have a unique Customer_Number__c that is unique across all of the company's systems. They also have a custom Invoice__c object, with a Lookup to Account, to represent invoices that are sent out from their external system. This company wants to integrate invoice data back into Salesforce so Sales Reps can see when a customer is paying their bills on time. What is the optimal way to implement this?

Question20: A company processes Orders within their Salesforce instance. When an Order's status changes to 'Paid' it must notify the company's order management system (OMS). The OMS exposes SOAP web service endpoints to listen for when to retrieve the data from Salesforce. What is the optimal method to implement this?

Question21: Consider the code above.

When a user dicks on the Link of a Contact's name, what happens'

Question22: A developer has requirement to query three fields (id, name, Type) from an Account and first and last names for all Contacts associated with the Account.
Which option is the preferred optimized method to achieve this for the Account named 'Ozene Electronics'?

Question23: A company uses an external system to manage its custom account territory assignments. Every quarter, millions of Accounts may be updated in Salesforce with new Owners when the territory assignments are completed in the external system. What is the optimal way to update the Accounts from the external system?

Question24: A developer has written the following method:
static void processList(List<sobject> input){
Which code block can be used to call the method?

Question25: Ursa Major Solar has a custom object, serviceJcb__c, with an optional Lookup field to Account called Partr,er_service_Provider__c.
The TocaUobs__c field on Account tracks the total number of serviceJcb__o records to which a partner service provider Account is related.
What should be done to ensure that the TotalJobs_c field is kept up to date?

Question26: Which two queries are selective SOQL queries and can be used for a large data set of 200,000 Account records? Choose 2 answers

Question27: When calling a RESTful web service, a developer receives a JSON payload that has a data hierarchy that is nested three levels deep. How can the developer describe the external data?

Question28: An Apex trigger creates an Order__c record every time an Opportunity is won by a Sales Rep. Recently the trigger is creating two orders. What is the optimal method for a developer to troubleshoot this?

Question29: What is a valid request for the following REST method? (Choose two.)
@HttpPost global static void myPostMethod(String si, Integer il, Boolean bl, String 52)

Question30: A developer is writing code that requires making callouts to an external web service. Which scenario necessitates that the callout be made in an @future method?

Question31: A developer is building a Lightning web component that displays quantity, unit price, and the total for an order line item. The total is calculated dynamically as the quantity multiplied by the unit price.

What must be added to display the total?

Question32: What is the best way to display field-level error messages in Lightning?

Question33: Given the following code:

Assuming there were 10 Contacts and five Accounts created today, what is the expected result?

Question34: A developer needs to store variables to control the style and behavior of a Lightning Web Component. Which feature should be used to ensure that the variables are testable in both Production and all Sandboxes?

Question35: Which of the following about Dynamic Apex is incorrect?

Question36: An Apex class does not achieve expected code coverage. The testSetup method explicitly calls a method in the Apex class. How can the developer generate the code coverage?

Question37: What is the transaction limit on the max execution time?

Question38: A developer created a custom component to display an HTML table. The developer wants to be able to use the component on different Visualforce Pages and specify different header text for the table.
Which tag should the developer use inside the component?

Question39: What level can a hierarchy custom setting be defined for? (Choose three.)

Question40: After a Platform Event Is defined in a Salesforce org, events can be published via which two mechanisms?
Choose 2 answers

Question41: Choose the correct definition for <apex:actionFunction>.

Question42: The Salesforce admin at Cloud Kicks created a custom object called Region__c to store all postal zip codes in the United States and the Cloud
Kicks sales region the zip code belongs to.

Cloud Kicks wants a trigger on the Lead to populate the Region based on the Lead's zip code.
A)

B)


D)

Question43: What is the transaction limit for the number of SOSL queries?

Question44: How should a developer assert that a trigger with an asynchronous process has successfully run?

Question45: Exhibit.

A developer created a JavaScript function as a part of a Lightning web component (LWC) that surfaces information... about leads by imperatively calling getFetchLeadList when certain criteria are met.
What are these changes the developer should implement in the Apex class above to ensure the LWC can displ... data efficiently while preserving security?
Choose 3 answers

Question46: What are three benefits of using declarative customizations over code? Choose 3 answers

Question47: A company's support process dictates that any time a Case is closed with a Status of 'Could not fix,' an Engineering Review custom object record should be created and populated with information from the Case, the Contact, and any of the Products associated with the Case. What is the correct way to automate this using an Apex trigger?

Question48: Which use case is an appropriate fit for the @future asynchronous Apex method? (Choose two.)

Question49: This sales team needs a custom Visualforce page to enter sales orders. When a product is selected on the Visualforce page, a web service is invoked to determine if the product is in stock, and the result is displayed on the page.
How can a developer write this page to display the result of the web service and ensure governor limits for concurrent usage are not exceeded?

Question50: A company notices that their unit tests in a test class with many methods to create many records for prerequisite reference data are slow. What can a developer to do address the issue?

Question51: Which use case can only be performed by using asynchronous Apex?

Question52: Which method should be used to convert a Date to a String in the current user's locale?

Question53: How should a developer verify that a specific Account record is being tested in a test class for a visualforce controller?

Question54: The progress of an apex job queued is using the System.enqueueJob method and needs to be monitored.
Which options are valid? (Choose two.)

Question55: A developer has built a multi-page wizard using a single Custom Controller to query and update dat
a. Users are complaining that the pages are loading slowly.
What will improve performance? (Choose three.)

Question56: Universal Containers wants to use a Customer Community with Customer Community Plus licenses so their customers can track how many of containers they are renting and when they are due back. Many of their customers are global companies with complex Account hierarchies, representing various departments within the same organization. One of the requirements is that certain community users within the same Account hierarchy be able to see several departments' containers, based on a junction object that relates the Contact to the various Account records that represent the departments. Which solution solves these requirements?

Question57: Which of the follow be used together in DML operations (transaction)? (Choose two.)

Question58: A developer needs to design a custom object that will be integrated into a back-end system.
What should the developer do to ensure good data quality and to ensure that data imports, integrations, and searches perform well? (Choose two.)

Question59: What are the ways a developer can create test data of Contacts? (Choose two.)

Question60: Which two objects can be inserted in the same transaction? (Choose two.)

Question61: A developer needs to send Account records to an external system for backup purposes. The process must take a snapshot of Accounts as they are saved and then make a callout to a RESTful web service. The web service can only receive, at most, one record per call. Which feature should be used to implement these requirements?

Question62: Universal Containers wants to use a Customer Community with Customer Community Plus licenses to allow their customers access to track how many containers they have rented and when they are due back. Universal Containers uses a Private sharing model for External users.
Many of their customers are multi-national corporations with complex Account hierarchies. Each account on the hierarchy represents a department within the same business.
One of the requirements is to allow certain community users within the same Account hierarchy to see several departments' containers, based on a custom junction object that relates the Contact to the various Account records that represent the departments.
Which solution solves these requirements?

Question63: Consider the following code snippet, depicting an Azure component:

Which two interfaces can the developer implement to make the component available as a quick action?
Choose 2 answers

Question64: Business rules require a Contact to always be created when a new Account is created. What can be used when developing a custom screen to ensure an Account is not created if the creation of the Contact fails?

Question65: A developer is creating a Lightning web component that can be added to a Lightning App Page and displayed when the page Is rendered in desktop and mobile phone format. To ensure a great mobile experience, the developer chooses to use the SLDS grid utility.
Which two Lighting web components should the developer implement to ensure the application Is mobile-ready? Choose 2 answers

Question66: During the order of execution of a Visualforce page GET request, what happens after this step? Evaluate constructors on controllers and extensions

Question67: A large company uses Salesforce across several departments. Each department has its own Salesforce Administrator. It was agreed that each Administrator would have their own sandbox in which to test changes. Recently, users notice that fields that were recently added for one department suddenly disappear without warning. Also, Workflows that once sent emails and created tasks no longer do so. Which two statements are true regarding these issues and resolution? Choose 2 answers

Question68: Refer to re code segment above.

When following best practices for writing Apex taggers, which two lots are wrong or cause for concern? Choose 2 answers

Question69: What is the correct order of execution for Visualforce Page "get" requests (initial page visit)?

Question70: A company wants to incorporate a third-party web service to set the Address fields when an Account is inserted, if they have not already been set. What is the optimal way to achieve this?

Question71: Consider the following code snippet:

A developer needs to built an interactive Aura component that responds to the user's input by hiding or showing sections according the user preferences.
What are two best practices the developer can implement to hide or show the powerVserView and s-rar.daraVserView inner components, based on the value of the attribute isPowexUser?
Choose 2 answers
A)

B)

C)

Question72: During the Visualforce Page execution, what step follows immediately after "Evaluate constructors on controller and extensions"?

Question73: Assuming the CreateOneAccount class creates one account and implements the Queuetable interface, which syntax tests the Apex code?
A)

B)

C)

D)

Question74: What is a potential design issue with the following code?

Question75: What is the most efficient way in Visualforce to show information based on data filters defined by an end-user for a large volume of data?

Question76: Refer to the code snippet below:

As part of an Integration development effort, a developer is tasked to create an Apex method mat solely relies on the use of foreign identifiers In order to relate new contact records to existing Accounts in Salesforce. The account object contains a field marked as an external ID, the API Name of this field is Legacy_Id_c.
What Is the most efficient way to instantiate the parentAccount: variable on line 02 to ensure the newly created contact is properly related to the Account?
A)

B)

C)

D)

Question77: [FIND 'map' IN ALL FIELDS RETURNING Account (Id, Name), Contact, Opportunity, Lead] What is a valid return type for th|e following SOSL query?

Question78: Which scenario requires a developer to use an Apex callout instead of Outbound Messaging?

Question79: A developer receives an error when trying to call a global server-side method using the @remoteAction decorator. How can the developer resolve the error?

Question80: A developer created a JavaScript library that simplifies the development of repetitive tasks and features and uploaded the library as a static resource called jsutils in Salesforce. Another developer is coding a new Lightning web component (LWC) and wants to leverage the library.
Which statement properly loads the static resource within the LWC?

Question81: A Visualforce page contains an industry select list and displays a table of Accounts that have a matching value in their Industry field.

When a user changes the value in the industry select list, the table of Accounts should be automatically updated to show the Accounts associated with the selected industry.
What is the optimal way to implement this?

Question82: A Developer wishes to improve runtime performance of Apex calls by caching results on the client. What is the best way to implement this?

Question83: What is a best practice when unit testing a controller? (Choose two.)

Question84: When testing batch classes, what must a developer do? (Choose two.)

Question85: A company has a custom object. Order__c, that has a custom picklist field. Status__c, with values of New, In Progress," or Fulfilled and a lookup field, Contact_c, to Contact.
Which SOQL query wrii return a unique list of all the Contact records that have no Fulfilled Orders?

Question86: A company has a custom object, Sales Demo Request, that has a lookup to an Opportunity. It is required that a Sales Demo Request record be created when an Opportunity's Probability is greater than 50%. What is the optimal way to automate this?

Question87: Part of a custom Lightning Component displays the total number of Opportunities in the org, which is in the millions. The Lightning Component uses an Apex Controller to get the data it needs. What is the optimal way for a developer to get the total number of Opportunities for the Lightning Component?

Question88: A company has a custom object. Request__c. that has a field, Completed__c. and a Lookup to Opportunity, Opportunity__c.
Which SOQL query will get a unique list of all of the Opportunity records that have a Completed Request?

Question89: A company accepts orders for customers in their enterprise resource planning (ERP) crder__c records with a lookup field to Account. The Account object has an External ID field, ERP_Customer_ID__c.
What should the integration use to create new Order__c records that will automatically be related to the correct Account?

Question90: What is the best practice to initialize a Visualforce page in a test class?

Question91: A developer is building a Lightning web component to get data from an Apex method called getData that takes a parameter, name. The data should be retrieved when the user clicks the Load Data button.
Exhibit.

What must be added to get the data?

Question92: A developer must create a way for external partners to submit millions of leads into Salesforce per day-How should the developer meet this requirement?

Question93: A lead developer for a Salesforce organization needs to develop a page-centric application that allows the user to interact with multiple objects related to a Contact The application needs to implement a third-party JavaScript framework such as Angular, and must be made available in both Classic and Lightning Experience.
Given these requirements, what is the recommended solution to develop the application?

Question94: A developer is developing a reuseable Aura Component that will reside on an sObject Lightning Page with the following HTML snippet:
<aura:component implements="force:hasRecordId,flexipage:availableForAIIPageTypesM>
<div>Hello!</div>
</aura:component>
How can the component's Controller get the context of the Lightning Page that the sObject is on without requiring additional test coverage?

Question95: For compliance purposes, a company is required to track long-term product usage in their org. The information that they need to log will be collected from more than one object and. over time, they predict they will have hundreds of millions of records.
What should a developer use to implement this?

Question96: As part of their quoting and ordering process, a company needs to send PDFs to their document storage system's REST endpoint that supports OAuth 2.0. Each Salesforce user must be individually authenticated with the document storage system to send the PDF.
What is the optimal way for a developer to implement the authentication to the REST endpoint?

Question97: When developing a Visualforce page that will be used by a global organization that does business in many languages and many currencies, which feature should be used? (Choose three.)

Question98: What is the transaction limit for the number of records for SOQL queries?

Question99: The Metadata API___________.

Question100: A developer wrote a trigger on Opportunity that will update a custom Last Sold Date field on the Opportunity's Account whenever an Opportunity is dosed. In the test class for the trigger, the assertion to validate the Last Sold Date field fails.
What might be causing the failed assertion?

Question101: Customer billing data must be added and updated into Salesforce from a remote system on a weekly basis. Additionally, customer activity information must be extracted from Salesforce and put it into an on-premises data warehouse on a weekly basis.
Which approach should be used to import data into Salesforce and export data out of Salesforce, taking into consideration that these imports and exports can interfere with end-user operations during business hours and involve large amounts of data?

Question102: Universal Containers allows customers to log into a Salesforce Community and update their orders via a custom Visualforce page. Universal Containers' sales representatives can edit the orders on the same Visualforce page.
What should a developer use in an Apex test class to test that record sharing is enforced on the Visualforce page?

Question103: What should be added to the setup, in the location indicated, for the unit test above to create the controller extension for the test?
A)

B)

C)

D)

Question104: Which three Visualforce components can be used to initiate Ajax behavior to perform partial page updates? Choose 3 answers

Question105: A developer wrote an Apex class to make several callouts to an external system.
If the URLs used in these callouts will change often, which feature should the developer use to minimize changes needed to the Apex class?

Question106: A developer is trying to access org data from within a test class. Which sObject type requires the test class to have the (seeAllData=true) annotation?

Question107: The head of recruiting at Universal Containers wants to provide all internal users the ability to search for open positions by role, department, and location via a new recruiting app, In addition to search, users of the app should be able to refer a fried, apply for a position, and review the status of their current submissions. The app should be made available in Salesforce Mobile, but offline access is not required.
Given these requirements, what is the recommended approach to developer the app?

Question108: An org has a requirement that an Account must always have one and only one Contact listed as Primary. So selecting one Contact will de-select any others. The client wants a checkbox on the Contact called 'Is Primary' to control this feature. The client also wants to ensure that the last name of every Contact is stored entirely in uppercase characters. What is the optimal way to implement these requirements?

Question109: A company has a custom object Sales_Help_Request__c that has a Lookup relationship to Opportunity. The Sales_Help_Request__c has a number field, Number_of_Hours__c, that represents the amount of time spent on the Sales_Help_Request__c.
A developer is tasked with creating a field, Total_Hours__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?

Question110: A company has the Lightning Component above that allows users to dick a button to save their changes and redirects them to a different page. Currently, when the user hits the Save button the records are getting saved, but they are not redirected.
Which three techniques can a developer use to debug the JavaScript? Choose 3 answers

Question111: A developer has a Batch Apex process, Batch_Account_Sales, that updates the sales amount for 10,000 Accounts on a nightly basis. The Batch Apex works as designed In the sandbox. However, the developer cannot get code coverage on the Batch Apex class.
The test class is below:

What is causing the code coverage problem?

Question112: Line 1 public class AttributeTypes Line 2 { Line 3 private final String[] arrayItems; Line 4 Line 5 @AuraEnabled Line 6 public List<String> getStringArray() { Line 7 Strings+ arrayItems = new String*+, 'red', 'green', 'blue' -; Line 8 return arrayItems; Line 9 } Line 10 } Consider the Apex controller above that is called from a Lightning Aura Component. What is wrong with it?

Question113: Which three approaches should a developer Implement to obtain the best performance for data retrieval when building a Lightning web component?
Choose 3 answers

Question114: Which of the following elements can be members of a public group? (Choose three.)

Question115: A developer is working on code that requires a call to an external web service from a batch. How should the developer enable this functionality?

Question116: A custom Aura component, AddressValidation,cmp,exists in the system. The Salesforce admin for the organization is unable to find and select the component while creating a quick action for the Account sObject.
What should the developer do to ensure that AddressValidation,cmp can be selected when creating a quick action?

Question117: .A developer is asked to update data in an org based on new business rules. The new rules state that Accounts with the type set to 'Customer' should have a status of 'Active,' and Accounts with the type set to 'Prospect' should have a status of 'Pending.' No other changes to data should be made. Which code block will accurately meet the business requirements?
A)

B)

C)

D)

Question118: A developer needs to create a Lightning page for entering Order Information. An error message should be displayed if the zip code entered as part of the Order's shipping address is not numeric.
What is a recommended way for the error message be displayed to the end user?

Question119: Universal Containers uses a custom Lightning page to provide a mechanism to perform a step-by-step wizard search for Accounts. One of the steps in the wizard is to allow the user to input text into a text field, ERP_Number__c, that is then used in a query to find matching Accounts.

A developer receives the exception 'SOQL query not selective enough.
Which step should be taken to resolve the issue?

Question120: Universal Containers (UC) wants to develop a customer community to help their customers log issues with their containers. The community needs to function for their German- and Spanish-speaking customers also. UC heard that it's easy to create an international community using Salesforce, and hired a developer to build out the site.
What should the developer use to ensure the site is multilingual?

Question121: What is the transaction limit for the number of records for SOSL?

Question122: What is the transaction limit for the number of records per DML statement?

Question123: What is the transaction limit on the number of callouts?

Question124: Consider the above trigger intended to assign the Account to the manager of the Account''s region. Which two changes should a developer make in this trigger to adhere to best practices? Choose 2 answers

Question125: A lead developer is creating tests for a Lightning web component. The component re-renders when a property called bypassSelection. changes its value.
What should the developer use to the test that the component re-renders successfully when the property changes?

Question126: The Account edit button must be overridden in an org where a subset of users still use Salesforce Classic. The org already has a Lightning Component that will do the work necessary for the override, and the client wants to be able to reuse it,
How should a developer implement this?

Question127: Which type of controller is best suited when you want all of the basic DML functions from an object's normal new/edit page?

Question128: A developer is writing a Visualforce page that queries accounts in the system and presents a data table with the results. The users want to be able to filter the results based on up to five fields. However, the users want to pick the five fields to use as filter fields when they run the page.
Which feature of Apex code is required to facilitate this solution?

Question129: A developer built a Component to be used at the front desk for guests to self-register upon arrival at a kiosk. The developer is now asked to create a Component for the Utility Tray to alert Users whenever a guest has arrived at the front desk. What should be used?

Question130: What Salesforce tool lets you deploy/retrieve metadata, check status of apex jobs, and check responses of REST calls?