EMT Practice Test

1. Question Content...


Question List

Question1: The Salesforce instance at Universal Containers currently integrates with a third-party company to validate mailing addresses via REST services. The third-party address verification system recently changed endpoint URLs for all their set vices from https://th-addreaa-service.3pc.com to https://plc1-mailsarvice.3pc.com. Everything else remained the same. The developer updated code to reflect this endpoint change, but the mailing address validation service stopped working after the change.
What else should be done to complete this web service end point change?

Question2: The maximum view state size of a visualforce page is______________.

Question3: A managed package uses a list of country ISO codes and country names as references data in many different places.. managed package Apex code.
What is the optimal way to store and retrieve the list?

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

Question5: How long is field history retained?

Question6: When should you use the "transient" property on variables?

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

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

Question9: A developer has created a Team Member sObject that has a Master-Detail relationship to a Project sObject and a Lookup relationship to the User sObject. The developer must ensure that a User listed on a Team Member record has Read-Write access to the parent Project record.
How can the developer accomplish this if the Project sObject has a Private sharing model and thousands of Project records?

Question10: A customer has a single Visualforce page that allows each user to input up to 1500 sales forecasts and instantly view pivoted forecast calculations. Users are complaining that the page is loading slowly, and they are seeing error messages regarding heap and view state limits.
What are three recommendations to optimize page performance? (Choose three.)

Question11: What is the transaction limit on the max timeout for all callouts?

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

Question13: A company decides that every time an Opportunity is created, they want to create a follow up Task and assign it to the Opportunity Owner.
What should a developer use to implement the requirements?

Question14: A company has a native iOS app for placing orders that needs to connect to Salesforce to retrieve consolidated information from many different objects in a JSON format. Which is the optimal method to implement this in Salesforce?

Question15: A company has a Request__c object that has a lookup to the Opportunity object and a custom field. Status__c, with values of Open,' Closed, and Invalid.' An Opportunity should not be allowed to be deleted if there are any Request__c records related to it that have a Status__c value of Open or 'Closed.' what is the optimal way to enforce the requirement to prevent deletion?

Question16: The test method above calls an @future method that increments the Number_of_Times_Viewed__c value. The assertion is failing because the Number_of_Times_Viewed__c equals 0. What is the optimal way to fix this?

Question17: Just prior to a new deployment, the Salesforce Administrator who configured a new order fulfillment process in a developer sandbox suddenly left the company. The users had fully tested all of the changes in the sandbox and signed off on them.
Unfortunately, although a Change Set was started, it was not complete. A developer is brought in to help finish the deployment.
What should the developer do to identify the configuration changes that need to be moved into production?

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

Question19: A business process requires sending new Account records to an external system. The Account Name, Id, CreatedDate. and CreatedByld must be passed to the external system in near real-time when an Account is Inserted without error.
How should a developer achieve this?

Question20: Universal Containers needs to integrate with a Heroku service that resizes product images submitted by users.
What are two alternatives to implement the integration and protect against malicious calls to Heroku app's endpoint? Choose 2 answers

Question21: A developer is writing a complex application involving triggers, workflow rules, Apex classes, and processes. The developer needs to carefully consider the order of execution when developing the application.
1. Before Triggers
2. After Triggers
3. Post commit logic such as sending email
4. DML committed to the database
5. Workflow rules
6. Roll-up summary calculations
In what order do the following operations execute?

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

Question23: A developer encounters an error that states that the Apex heap size is exceeded. Which technique may reduce heap size?

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

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

Question26: The "action" attribute on <apex:page> is ONLY evaluated on which type of request?

Question27: What is the correct syntax for calling a controller action from a Visualforce page and updating part of the page once the action is completed? (Choose two.)

Question28: Consider the following queries. For these queries, assume that there are more than 200,000 Account records. These records include soft-deleted records; that is, deleted records that are still in the Recycle Bin. Note that there are two fields that are marked as External Id on the Account. These fields are Customer_Number__c and ERP_Key__c.
Which two queries are optimized for large data volumes? Choose 2 answers

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

Question30: Universal Containers implements a private sharing model for the Convention_Attendence_c custom object. As part of a new quality assurance effort, the company created an Event___Reviewer__c user lookup field on the object. Management wants the event reviewer to automatically gain Read/write access to every record they are assigned to.
What is the best approach to ensure the assigned reviewer obtains Read/Write access to the record?

Question31: Lightning Aura Component

Given the code above, which two changes need to be made in the Apex Controller for the code to work' Choose 2 answers

Question32: A developer sees test failures in the sandbox but not in production. No code or metadata changes have been actively made to either environment since the sandbox was created.
Which consideration should be checked to resolve the issue?

Question33: A developer has written an After Update trigger on Account. A workflow rule and field update cause the trigger to repeatedly update the Account records.
How should the developer handle the recursive trigger?

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

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

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

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

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

Question39: REST uses___________.

Question40: What is a benefit of using a WSDL with Apex?

Question41: @isTest static void testAccountUpdate() { Account acct = new Account({Name = 'Test'); acct.Integration Updated_c = false; insert acct; CalloutUtil.sendAccountUpdate (acct.Id); Account acctAfter = [SELECT Id, Integration Updated_c FROM Account WHERE Id = :acct.Id] [0]; System.assert(true, acctAfter.Integration_Updated_c); } The test method above calls a web service that updates an external system with Account information and sets the Account's Integration_Updated__c checkbox to True when it completes. The test fails to execute and exits with an error: "Methods defined as TestMethod do not support Web service callouts." What is the optimal way to fix this?

Question42: A developer must create a custom pagination solution. While users navigate through pages, if the data is changed from elsewhere, users should still see the cached results first accessed.
How can the developer meet these requirements?

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

Question44: A Lightning Component has a section that displays some information about an Account and it works well on the desktop, but users have to scroll horizontally to see the Description field output on their mobile devices and tablets.

Which option has the changes to make the component responsive for mobile and tablet devices?

Question45: What is the optimal syntax for adding a link to a case in a Visualforce page? (Choose two.)

Question46: 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.)

Question47: The Contact object has a custom field called "Zone." Its data type is "Text" and field length is 3. What is the outcome after executing the following code snippet in the org?

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

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

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

Question51: A developer i$ tasked Dy Unversai Containers to build out a system to track the container repair process. Containers should be tracked as they move through the repair process, starting when a customer reports an issue and ending when the container is returned to the customer.
Which solution meets these business requirements while following best practices?

Question52: A developer is building a Visualforce page that interacts with external services.
Which interface should the developer implement to test this functionality? (Choose two.)

Question53: A company has code to update a Request and Request Lines and make a callout to their external ERP system's REST endpoint with the updated records.

The CalloutUtil. makeRestCallout fails with a 'You have uncommitted work pending. Please commit or rollback before calling out' error. What should be done to address the problem?

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

Question55: In an organization that has multi-currency enabled, a developer is tasked with building a Lighting Component that displays the top ten Opportunities most recently access by the logged in user. The developer must ensure the Amount and LastModifiedDate field values are displayed according to the user's locale.
What is the most effective approach to ensure values displayed respect the users locale settings?

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

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

Question58: A developer wants to integrate invoice and invoice line data into Salesforce from a custom billing system. The developer decides to make realtime callouts from the billing system using the SOAP API. Unfortunately, the developer is getting a lot of errors when inserting the invoice line data because the invoice header record doesn't exist yet.
What will help ensure ne transactional Integrity of the integration?

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

Question60: What is the transaction limit for SOQL queries?

Question61: A developer has generated Apex code from a WSDL for an external web service. The web service requires Basic authentication.
What code should the developer use to authenticate?

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

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

Question64: Universal Containers has a Visualforce page that displays a table every Container_ c being rented by a gives Account.. failing because some of the customers rent over 100,000 containers.
What should a developer change about the Visualforce page to help with the page load errors?

Question65: What can be done to improve the performance of the insert trigger shown above?

Question66: What is the transaction limit for the number of records using QueryLocator?

Question67: Given the following code:

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

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

Question69: A Lightning Component functions in preview mode and needs to be used inside a Lightning App Builder page, but it is not available. What change should be applied to the component?

Question70: A developer writes the following Apex trigger so that when a Case is closed, a single Survey record is created for that Case. The issue is that multiple Survey_c records are being created per Case.

What could be the cause of this issue?

Question71: What tool in the Developer Console contains information on SOQL query Cardinality?

Question72: Code must have X% overall code coverage.

Question73: An org has a requirement that addresses on Contacts and Accounts should be normalized to a company standard by Apex code any time that they are saved.
What is the optimal way to implement this?

Question74: Which statement is true about using ConnectApi namespace (also called Chatter in Apex)? (Choose two.)

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

Question76: A developer writes the following code:

While testing the code, the developer receives the following error message: System.CalloutException : You have uncommitted work pending What should the developer do? (Choose two.)

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

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

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

Question80: 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.)

Question81: A developer gets an error saying 'Maximum Trigger Depth Exceeded.' What is a possible reason to get this error message?

Question82: Which of the following standard fields are indexed? (Choose three.)

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

Question84: As part of a custom development, a developer creates a Lightning Component to show how a particular opportunity progresses over time. The component must display the date stamp when any of the following fields change:
* Amount Probability, Stage, or Close Date
What is the most efficient way to Query such information?

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

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

Question87: A developer is writing unit tests for the following method:

Which assertion would be used in a negative test case?

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

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

Question90: An org has a requirement that the Shipping Address on the Account must be validated by a third-party web service, before the Account is allowed to be inserted.
What is the optimal way to meet this requirement?

Question91: A company needs to automatically delete sensitive information after 7 years. This could delete almost a million records every day.
How can this be achieved?

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

Question93: A developer wants to call an Apex Server-side Controller from a Lightning Aura Component. What are two limitations to the data being returned by the Controller? Choose 2 answers

Question94: Universal Containers wants to be able to bring up an Account detail page and view a table of containers currently being rented. The user wants to be able to dick on a container In the table and quickly edit and save the location of the container.
In addition to this, the page should have a section that shows the location of each container on a map. Universal Containers wants the map to re-render whenever the location of a container is changed.
What can a developer use to accomplish this task?

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

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

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

Question98: A company uses Opportunism to track sales to their customers and their org has millions of Opportunities. They want to begging to track revenue over time through a related Revenue object.
As part of their initial implementation, they want to perform a one-time seeding of their data by automatically creating and populating Revenue records for Opportunities, based on complex logic. They estimate that roughly 100,000 Opportunities will have revenue records and populated.
What is the optimal way to automate this?

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