EMT Practice Test

1. Question Content...


Question List

Question1: A developer considers the following snippet of code:

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

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

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

Question4: When importing and exporting data into Salesforce, which two statements are true?
Choose 2 answers

Question5: A developer needs to create a custom button for the Account object that, when clicked, will perform a series of calculation and redirect the user to a custom visualforce page.
Which three attributes need to be defined with values in the <apex:page> tag to accomplish this?
Choose 3 answers

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

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

Question8: Which declarative process automation feature supports iterating over multiple records?

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

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

Question11: A developer has a VF 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?

Question12: A developer creates a new Apex trigger with a helper class, and writes a test class that only exercises 95% coverage of new Apex helper class. Change Set deployment to production fails with the test coverage warning: "Test coverage of selected Apex Trigger is 0%, at least 1% test coverage is required" What should the developer do to successfully deploy the new Apex trigger and helper class?

Question13: Which two statements accurately represent the MVC framework implementation in Salesforce? Choose 2 answers

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

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

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

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

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

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

Question20: A developer of Universal Containers is tasked with implementing a new Salesforce application that must be able to by their company's Salesforce administrator.
Which three should be considered for building out the business logic layer of the application? Choose 3 answers

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

Question22: Which salesforce org has a complete duplicate copy of the production org including data and configuration?

Question23: A recursive transaction is limited by a DML statement creating records for these two objects:
1. Accounts
2. Contacts
The Account trigger hits a stack depth of 16.
Which statement is true regarding the outcome of the transaction?

Question24: A developer creates a custom exception as shown below:
What are two ways the developer can fire the exception in Apex? Choose 2 answers

Question25: What is the result of the following code?

Question26: Which aspect of Apex programming is limited due to multitenancy?

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

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

Question29: The following automations already exist on the Account object;
* A workflow rule that updates a field when a certain criteria is met
* A custom validation on a field
* A How that updates related contact records
A developer created a trigger on the Account object.
What should the developer consider while testing the trigger code?

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: How should a custom user interface be provided when a user edits an Account in Lightning Experience?

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

Question33: Which three statements are true regarding trace flags? (Choose three.)

Question34: Managers at Universal Containers want to ensure that only decommissioned containers are able to be deleted in the system. To meet the business requirement a Salesforce developer adds ^Decommissioned" as a picklist value for the Status__: custom field within the Contact__c object.
Which tool should the developer use to enforce only Container records with a status of "Decommissioned" can be deleted?

Question35: Universal Containers (UC) uses a custom object called Vendor. The Vendor custom object has a Master-Detail relationship with the standard Account object. Based on some internal discussion, the UC administrator tried to change the Master-Detail relationship to a Lookup relationship but was not able todo so. What is apossible reason that this change was not permitted?

Question36: A developer must provide a custom user interface when users edit a Contact. Users must be able to use the interface in Salesforce Classic and Lightning Experience.
What should the developer do to provide the custom user interface?

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

Question38: What will be the output in the debug log in the event of a QueryExeption during a call to the @query method in the following Example?

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

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

Question41: A Next Best Action strategy uses an Enhance Element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors. What is the correct definition of the Apex method?

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

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

Question44: Which three per-transaction limits have higher governor limits in asynchronous Apex transactions?

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

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

Question47: While writing an Apex class that creates Accounts, a developer wants to make sure that all required fields are handled properly.
Which approach should the developer use to be sure that the Apex class works correctly?

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

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

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

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

Question52: 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); }

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

Question54: Which three operations affect the number of times a trigger can fire?
Choose 3 answers

Question55: Universal container wants a list button to display a visualforce page that allows users to edit multiple records which visualforce feature supports this requirement.

Question56: Universal Containers wants to back up all of the data and attachments in its Salesforce org once month. Which approach should a developer use to meet this requirement?

Question57: 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?
A)

B)

C)

D)

Question58: An Approval Process is defined In the Expense__item__c object. A business rule dictates that whenever a ... clients the Status to Submitted on an Expense_Item__c record related to the expense report must enter the approval process individually.
A developers asked to explore if this automation can be implemented without writing any Apex code.
Which statement is true regarding this automation request?

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

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

Question61: A developer has requirement to write Apex code to update a large number of account records on a nightly basis. The system administrator needs to be able to schedule the class to run after business hours on an as-needed basis.
Which class definition should be used to successfully implement this requirement?

Question62: Which code should be used to update an existing Visualforce page that uses standard Visualforce components so that the page matches the look and feel of Lightning Experience?

Question63: Refer to the following Apex code:

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

Question64: Which three web technologies can be integrated into a Visualforce page? (Choose three.)

Question65: A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of test allowing them to test independent requirements various types of Salesforce Cases.
Which approach can efficiently generate the required data for each unit test?

Question66: While writing a test class that covers an OpportunityLineItem trigger, a Developer is unable to create a standard PriceBook since one already exists in the org.
How should the Developer overcome this problem?

Question67: Cloud Kicks Fitness, an ISV Salesforce partner, is developing a managed package application. One of the application modules allows the user to calculate body fat using the Apex class, BodyFat, and its method, calculateBodyFat(). The product owner wants to ensure this method is accessible by the consumer of the application when developing customizations outside the ISV's package namespace.
Which approach should a developer take to ensure calculateBodyFat() is accessible outside the package namespace?

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

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

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

Question71: A business implemented a magnification plan to encourage its customers to watch some educational videos.
Customers can watch videos over several days, and their progress is recorded. Award points are granted to customers for all completed videos. When the video is marked as completed in Salesforce, an external web service must be called so that points can be awarded to the user.
A developer implemented these requirements in the after update trigger by making a calf to an external web service. However, a System.CalloutException is occurring.
What should the developer do to fix this error?

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

Question73: Which process automation should be used to post a message to Chatter without using Apex code?

Question74: The following Apex method is part of the ContactService class that is called from a trigger: public static void setBusinessUnitToEMEA(Contact thisContact){ thisContact.Business_Unit__c = "EMEA" ; update thisContact; } How should the developer modify the code to ensure best practice are met?

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

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

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

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

Question79: A developer needs to prevent the creation of Request_c records when certain conditions exist in the system. A RequestLogic class exists to checks the conditions. What is the correct implementation?

Question80: An Apex method, getAccounts, that returns a List of Accounts given a search Term, is available for Lighting Web components to use. What is the correct definition of a Lighting Web component property that uses the getAccounts method?

Question81: A developer Edition org has five existing accounts. A developer wants to add 10 more accounts for ...
The following code is executed in the Developer Console using the Executor Anonymous window:

How many total accounts will be in the org after this code is executed?

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

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

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

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

Question86: Universal Containers has a support process that allows users to request support from its engineering team using a custom object, Engineering_Support__c.
Users should be able to associate multiple engineering_Support__c records to a single Opportunity record.
Additionally, aggregate Information about the Engineering_support__c records should be shown on the Opportunity record.
What should a developer Implement to support these requirements?

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

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

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

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

Question91: What is the order of operations when a record is saved in Salesforce?

Question92: What can used to delete components from production?

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

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

Question95: What are two best practices when it comes to Lightning Web Component events?

Question96: What are three techniques that a developer can use to invoke an anonymous block of code? (Choose three.)

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

Question98: 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; }

Question99: Which exception type cannot be caught?

Question100: Which action may cause triggers to fire?

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

Question102: Which three resources in an Aura Component can contain Javascript functions? Choose 3 answers

Question103: Which two characteristics are true for Aura component events? Choose 2 answers

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