EMT Practice Test

1. Question Content...


Question List

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

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

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

Question3: What Is the result of the following code?

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

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

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

Question7: A developer creates a batch Apex job to update a large number of records, and receives reports of the job timing out and not completing.
What is the first step towards troubleshooting the issue?

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

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

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

Question11: Given the following Apex statement:

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

Question12: A developer created a trigger on the Account object and wants to test if the trigger is properly bulkified. The developer team decided that the trigger should be tested with 200 account records with unique names.
What two things should be done to create the test data within the unit test with the least amount of code?
Choose 2 answers

Question13: An org has an existing flow that edits an Opportunity with an Update Records element. A developer must update the flow to also create a Contact and store the created Contact's ID on the Opportunity.
Which update must the developer make in the flow?

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

Question15: How does the Lightning Component framework help developers implement solutions faster?

Question16: 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.
Which relationship field should be implemented to support these requirements?

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

Question18: A Primaryid__c custom field exists on the candidate_ c custom object. The field is used to store each candidate's id number and is marked as Unique in the schema definition.
As part of a data enrichment process, Universal Containers has a CSV file that contains updated data for all candidates in the system. The file contains each Candidate's primary id as a data point. Universal Containers wants to upload this information into Salesforce, while ensuring all data rows are correctly mapped to a candidate in the system.
Which technique should the developer implement to streamline the data upload?

Question19: A developer needs to allow users to complete a form on an Account record that will create record for a custom object.
The form needs to display different fields depending on the user's job role. The functionality should only be available to a small group of users.
Which three things should the developer do to satisfy these requirements?
Choose 3 answers

Question20: What should a developer use to obtain the Id and Name of all the Leads, Accounts, and Contacts that have the company name "Universal Containers"?

Question21: 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 permissions for the currently logged in user while using the custom search tool?

Question22: A Salesforce administrator used Flow Builder to create a flow named "accountOnboarding". The flow must be used inside an Aura component.
Which tag should a developer use to display the flow in the component?

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

Question24: A developer is creating an app that contains multiple Lightning web components.
One of the child components is used for navigation purposes. When a user clicks a button called Next in the child component, the parent component must be alerted so it can navigate to the next page.
How should this be accomplished?

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

Question26: A developer created a child Lightning web component nested inside a parent Lightning web component. The parent component needs to pass a string value to the child component.
In which two ways can this be accomplished?
Choose 2 answers

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

Visualforce page snippet:

what should the developer do to correct the problem?

Question28: A developer needs to have records with specific field values in order to test a new Apex class.
What should the developer do to ensure the data is available to the test?

Question29: 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 this component available?
Choose 2 answers

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

Question31: Which code displays the contents of a Visualforce page as a PDF?

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

Question33: What are two considerations for deploying from a sandbox to production? Choose 2 answers

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

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

Question36: A business has a proprietary Order Management System (QMS) that creates orders from Its website and fulfills the orders. When the order Is created in the OMS, an integration also creates an order record In Salesforce and relates It to the contact as identified by the email on the order. As the order goes through different stages in the OMS, the integration also updates it in Salesforce.
The business notices that each update from the OMS creates a new order record in Salesforce.
Which two actions should prevent the duplicate order records from being created in Salesforce?

Question37: While developing an Apex class with custom search functionality that will be launched from a Lightning Web Component, how can the developer ensure only records accessible to the currently logged in user are displayed?

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

Question39: A company decides to implement a new process where every time an Opportunity is created, a follow up Task should be created and assigned to the Opportunity Owner.
What is the most efficient way for a developer to implement this?

Question40: 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__c custom field within the Container__c object.
Which two approaches could a developer use to enforce only Container records with a status of "Decommissioned" can be deleted?
Choose 2 answers

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

Question42: A developer has the following requirements:
Calculate the total amount on an Order.
Calculate the line amount for each Line Item based on quantity selected and price.
Move Line Items to a different Order if a Line Item Is not In stock.
Which relationship implementation supports these requirements on its own?

Question43: In terms of the MVC paradigm, what are two advantages of implementing the view layer of a Salesforce application using Lightning Web Component-based development over Visualforce?
Choose 2 answers

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

Question45: A developer creates a Lightning web component that imports a method within an Apex class. When a Validate button is pressed, the method runs to execute complex validations.
In this implementation scenario, which two options are part of the Controller according to the MVC architecture?
Choose 2 answers

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

Question47: A developer creates a new Apex trigger with a helper class, and writes a test class that only exercises 95% coverage of the 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?

Question48: A developer must write an Apex method that will be called from a Lightning component. The method may delete an Account stored in the accountRec variable.
Which method should a developer use to ensure only users that should be able to delete Accounts can successfully perform deletions?

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

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

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

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

Question53: A developer wrote Apex code that calls out to an external system using REST API.
How should a developer write the test to prove the code is working as intended?

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

Question55: Which code in a Visualforce page and/or controller might present a security vulnerability?

Question56: A developer creates a custom exception as shown below:
public class ParityException extends Exception. {}
What are two ways the developer can fire the exception in Apex? Choose 2 answers

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

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

Question59: What Is the result of the following code snippet?

Question60: A developer is creating a page that allows users to create multiple Opportunities. The developer is asked to verify the current user's default Opportunity record type, and set certain default values based on the record type before inserting the record.
How can the developer find the current user's default record type?

Question61: A lead developer creates an Apex interface called Laptop.
Consider the following code snippet:

How can a developer use the Laptop Interface within the silverzaptop class?

Question62: While working in a sandbox, an Apex test fails when run in the Test Runner. However, executing the Apex logic in the Execute Anonymous window succeeds with no exceptions or errors. Why did the method fail in the sandbox test framework but succeed in the Developer Console?

Question63: A developer considers the following snippet of code:

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

Question64: A custom picklist field, Food _Preference_ c, exists on a custom object. The picklist contains the following options: 'Vegan', 'Kosher', 'No Preference'. The developer must ensure a value is populated every time a record is created or updated.
What is the optimal way to ensure a value is selected every time a record is saved?

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

Question66: What are three considerations when using the @InvocableMethod annotation in Apex?
Choose 3 answers

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

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

Question69: A developer is migrating a Visualforce page into a Lightning web component.
Salesforce Certified Platform Developer I
The Visualforce page shows information about a single record. The developer decides to use Lightning Data Service to access record data.
Which security consideration should the developer be aware of?

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

Question71: Universal Containers has a Visualforce page that displays a table of every Container___c being rented by a given Account. Recently this page is failing 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?

Question72: A developer is creating a Lightning web component to show a list of sales records.
The Sales Representative user should be able to see the commission field on each record. The Sales Assistant user should be able to see all fields on the record except the commission field.
How should this be enforced so that the component works for both users without showing any errors?

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

Question74: A developer created a new after insert trigger on the Lead object that creates Task records for each Lead.
After deploying to production, an existing outside integration that inserts Lead records in batches to Salesforce is occasionally reporting total batch failures being caused by the Task insert statement. This causes the integration process in the outside system to stop, requiring a manual restart.
Which change should the developer make to allow the integration to continue when some records in a batch cause failure due to the Task insert statement, so that manual restarts are not needed?

Question75: 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 Defect__c to represent that a defect is a cause of a customer issue Case and Defect__c have Private organization-wide defaults.
What should be done to share a specific Case_Defect__c record with a user?

Question76: Refer to the following Apex code:

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

Question77: A developer created a trigger on the Account object. While testing the trigger, the developer sees the error message 'Maximum trigger depth exceeded'.
What could be the possible causes?

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

Question79: A developer completed modifications 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?
Choose 2 answers

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