EMT Practice Test

1. Question Content...


Question List

Question1: Which two statements are true about Getter and Setter methods as they relate to Visualforce?

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

Question3: What should be used to create scratch orgs?

Question4: 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 the component available?

Question5: 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 Assistance user should be able to see all field on the record except the commission field.
How should this be enforced so that the component works for both users without showing any errors?

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

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

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

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

Question10: What is a benefit of developing applications in a multi-tenant environment?

Question11: Einstein Next Best Action Is configured at Universal Containers to display recommendations to internal users on the Account detail page.
If the recommendation is approved, a new opportunity record and task should be generated. If the recommendation is rejected, an Apex method must be executed to perform a callout to an external system.
Which three factors should a developer keep Hi mind when implementing the Apex method?
Choose 3 answers

Question12: A developer is asked to create a Visualforce page for Opportunities that allows users to save or merge the current record.
Which approach should the developer to meet this requirement?

Question13: A Visual Flow 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 additional information?

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

Question15: Considering the following code snippet:

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

Question16: A developer created these three Rollup Summary fields in the custom object, Project_ct,

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?

Question17: Given the code below:

What should a developer do to correct the code so that there is no chance of hitting a governor limit?

Question18: A developer is implementing an Apex class for a financial system. Within the class, the variables 'creditAmount' and 'debtAmount' 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

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

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

Question21: A developer is building custom search functionality that uses SOSL to search account and contact records that match search terms provided by the end user. The feature is exposed through a Lightning web component, and the end user is able to provide a list of terms to search.
Consider the following code snippet:

What is the maximum number of search terms the end user can provide to successfully execute the search without exceeding a governor limit?

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: Which three per-transaction limits have higher governor limits in asynchronous Apex transactions?

Question25: Which three process automations can immediately send an email notification to the owner of an Opportunity when its Amount is changed to be greater than $10,000? Choose 3 answers

Question26: A developer needs to implement the functionality for a service agent to gather multiple pieces of information from a customer in order to send a replacement credit card.
Which automation tool meets these requirements?

Question27: What is a key difference between a Master-Detail Relationship and a Lookup Relationship?

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

Question29: What are two benefits of using declarative customizations over code? Choose 2 answers What are two benefits of using declarative customizations over code?

Question30: When using SalesforceDX, what does a developer need to enable to create and manage scratch orgs?

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

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

Question33: How should a custom user interface be provided when a user edits an Account in Lightning Experience?

Question34: A developer must build application that tracks which Accounts have purchase specific pieces of equal products. Each Account could purchase many pieces of equipment.
How should the developer track that an Account has purchased a piece of equipment.

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

Question36: Given the following Anonymous Block:

Which one do you like?
What should a developer consider for an environment that has over 10,000 Case records?

Question37: Considering the following code snippet:

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

Question38: Which two characteristics are true for Aura component events?

Question39: A Licensed_Professional__c custom object exist in the system with two Master-Detail fields for the following objects: Certification__c and Contact. Users with the "Certification Representative" role can access the Certification records they own and view the related Licensed Professionals records, however users with the "Salesforce representative" role report they cannot view any Licensed professional records even though they own the associated Contact record. What are two likely causes of users in the "Sales Representative" role not being able to access the Licensed Professional records? Choose 2 answers

Question40: A develop completed modification 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?

Question41: What can be developed using the Lightning Component framework?

Question42: A developer uses a loop to check each Contact in a list. When a Contact with the Title of
"Boss" is found, the Apex method should jump to the first line of code outside of the for loop.
Which Apex solution will let the developer implement this requirement?

Question43: Considering the following code snippet:

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

Question44: A developer must modify the following code snippet to prevent the number of SOQL queries issued from exceeding the platform governor limit. public class without sharing OpportunityService( public static List<OpportunityLineItem> getOpportunityProducts(Set<Id> opportunityIds){ List<OpportunitylineItem> oppLineItems = new List<OpportunityLineItem>(); for(Id thisOppId : opportunityIds){ oppLineItems.addAll([Select Id FROM OpportunityLineItems WHERE OpportunityId = :thisOppId)]; } return oppLineItems; } } The above method might be called during a trigger execution via a Lightning component. Which technique should be implemented to avoid reaching the governor limit?

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

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

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

Question48: The orderHelper class is a utility class that contains business logic for processing orders. Consider the following code snippet:
A developer needs to create a constant named DELIVERY_MULTIFILTER 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_MULTIFILTER constant to meet the business objectives?

Question49: Which two statements true about Getter and Setter methods as they relate to Visualforce? Choose 2 answers

Question50: Given the following block code: try{ List <Accounts> retrievedRecords = [SELECT Id FROM Account WHERE Website = null]; }catch(Exception e){ //manage exception logic } What should a developer do to ensure the codeexecution is disrupted if the retrievedRecordslist remains empty after the SOQL query?

Question51: Which two are phases in the Salesforce Application Event propagation framework? Choose
2 answers

Question52: Universal Containers decides to use purely declarative development to build out a new Salesforce application.
Which three options can be used to build out the business logic layer for this application?
Choose 3 answers

Question53: Refer to the following code that runs in an Execute Anonymous block:

Question54: What are two ways that a controller and extension can be specified on a Visualforce page?
Choose 2 answers

Question55: What can used to delete components from production?

Question56: A developer created a weather app that contains multiple Lightning web components.
One of the components, called Toggle, has a toggle for Fahrenheit or Celsius units. Another component, called Temperature, displays the current temperature in the unit selected in the Toggle component When a user toggles from Fahrenheit to Celsius or vice versa in the Toggle component, the information must be sent to the Temperature component so the temperature can be converted and displayed.
What is the recommend way to accomplish this?

Question57: What is the maximum number of SOQL queries used by the following code? List<Account> aList = [SELECT Id FROM Account LIMIT 5]; for (Account a : aList){ List<Contact> cList = [SELECT Id FROM Contact WHERE AccountId = :a.Id); }

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

Question59: A developer has to identify a method in en 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 SOQL 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?
Choose 2 answers

Question60: Which statement should be used to allow some of the records in a list of records to be inserted rf others fail to be inserted?

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

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

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

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

Question65: A developer wrote the following two classes:

The StatusFetcher class successfully compiled and saved. However, the Calculator class has a compile time error.
How should the developer fix this code?

Question66: Get Cloudy Consulting (GCC) has a multitude of servers that host its customers' websites. GCC wants to provide a servers status page that is always on display in its call center. It should update in real time with any changes made to any servers. To accommodate this on the server side, a developer created a server Update platform event.
The developer is working on a Lightning web component to display the information.

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

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

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

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

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

Question72: An org has an existing Visual Flow that creates an Opportunity with an Update records element. A developer must update the Visual Flow also created a Contact and store the created Contact's ID on the Opportunity.

Question73: A third-party vendor created an unmanaged Lightning web component. The Salesforce Administrator wishes to expose the component only on Record Page Layouts.
Which two actions should the developer take to accomplish this business objective?
Choose 2 answers

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

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

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

Question77: Which statement is true about developing in a multi-tenant environment?

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

Question79: what are the methods used to show input in classic and lightning ?

Question80: A primaryid_c custom field exists on the candidate_c custom object. The filed 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?

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

Question82: Universal Containers stores Orders and Line Items in Salesforce. For security reason, financial representatives are allowed to see information on the Order such as order amount, but they are not allowed to see the Line items on the Order. Which type of relationship should be used?

Question83: Application Events follow the traditional publish-subscribe model. Which method is used to fire an event?

Question84: A developer wants to mark each Account in a List<Account> as either or Inactive based on the LastModified field value being more than 90 days.
Which Apex technique should the developer use?

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

Question86: Which code displays the content of Visualforce page as PDF?

Question87: Which standard field is required when creating a new contact record?

Question88: How many accounts will be inserted by the following block ofcode? for(Integer i = 0 ; i < 500; i++) { Account a = new Account(Name='New Account ' + i); insert a; }