Platform Developer I Mock 3

Welcome to your Platform Developer I Mock 3

Universal Containers has a large number of custom applications that were built using a third-party JavaScript framework and exposed using Visualforce pages. The company wants to update these applications to apply styling that resembles the look and feel of Lightning Experience. What should the developer do to fulfill the business request in the quickest and most effective manner?

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?

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

If Apex code executes inside the execute() method of an Apex class when implementing the Batchable interface, which two statement are true regarding governor limits? Choose 2 answers

Given the following Apex statement: Account myAccount = [SELECT Id, Name FROM Account]; What occurs when more than one Account is returned by the SOQL query?

A recursive transaction is initiated 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?

Universal Containers implemented a private sharing model for the Account object. A custom Account search tool was developer with Apex to help sales representatives find accounts that match multiple criteria they specify. Since its release, users of the tool report 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?

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?

Which Salesforce feature allows a developer to see when a user last logged in to Salesforce if real-time notification is not required?

A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces. Public interface Sortable{ void sort(); } Public interface Drawable{ void draw(); } Which is the correct implementation?

Which exception type cannot be caught?

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?

A developer has an Apex controller for a Visualforce page that takes an ID as a URL parameter. How should the developer prevent a cross site scripting vulnerability?

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

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

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?

What does the Lightning Component framework provide to developers?

A custom Visualforce controller calls the ApexPages . addNessage() method, but no messages are rendering on the page. Which component should be added to the Visualforce page to display the message?

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

A developer wrote Apex code that calls out to an external system. How should a developer write the test to provide test coverage?

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

A developer needs to confirm that a Contact works correctly without changing the organization's data. What should the developer do to test the Contact trigger?

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

A development team wants to use a deployment script to automatically deploy to a sandbox during their deployment cycles. Which tool should they use to deploy to the sandbox?

Which Salesforce org has a complete duplicate copy of the production org including data and configuration?

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

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

A team of many developers work in their own individual orgs that have the same configuration as the production org. Which type of org is best suited for this scenario?

A developer must create a Lightning component that allows users to input Contact record information to create a Contact record, including a Salary__c custom field. What should the developer use, along with a lightning-record-edit-form, so that Salary__c field functions as a currency input and is only viewable and editable by users that have the correct field level permissions on Salary__c ?

A developer must implement a CheckPaymentProcessor class that provides check processing payment capabilities that adhere to what is defined for payments in the PaymentProcessor interface. public interface PaymentProcessor { void pay (Decimal amount) ; } Which is the correct implementation to use the PaymentProcessor interface class?

A custom picklist field Food_Preference__c, exists as 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.

An org tracks customer orders on an Order object and the line items of an Order on the Line Item object. The Line Item object has a Master/Detail relationship to the Order object. A developer has 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?

Universal Containers used a simple Order Management app. On the Order Lines, the order line total is calculated by multiplying the item price with the quantity ordered. There is a Master-Detail relationship between the Order and the Order Lines object. What is the best practice to get the sum of all order line totals on the order header?

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

A developer must build an application that tracks which Accounts have purchased specific pieces of equipment that are represented as Products Each Account could purchase many pieces of equipment. How should the developer track that an Account has purchased a piece of equipment?

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 add to create the most efficient model that supports the business need?

A Licensed_Professional __c custom object exists 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 "Sales 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

A developer has the following requirements: Calculate the total amount on an Order. Calculate the 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?

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 discussions, the UC administrator tried to change the Master-Detail relationship to a Lookup relationship but was not able to do so. What is possible reason that this change was not permitted?

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

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

UC wants to assess the advantages of declarative development versus programmatic customization for specific use cases in its Salesforce implementation. What are two characteristics of declarative development over programmatic customization? Choose 2 answers

UC 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

Which two types of process automation can be used to calculate the shipping cost for an Order when the Order is placed and apply a percentage of the shipping cost to some of the related Order Products? Choose 2 answers

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 discussions, the UC administrator tried to change the Master-Detail relationship to a Lookup relationship but was not able to do so. What is possible reason that this change was not permitted?

Which two operations can be performed using a formula field? Choose 2 answers

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

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

A developer identifies the following triggers on the Expense__c object: deleteExpense; applyDefaultsToExpense; validateExpenseUpdate; The triggers process before delete, before insert, and before update event respectively. Which two techniques should the developer implement to ensure best practices are followed? Choose 2 answers

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?

A developer is debugging the following code to determine why Account 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?

A developer considers the following snippet of code: Boolean isOK; Integer x; String theString = 'Hello'; if(isOk == false && theString == 'Hello'){ x=1; }else if(isOK == true && theString == 'Hello'){ x=2; }else if(isOk == null && theString == 'Hello'){ x=3; }else{ x=4; } Based on this code, what is the value of x?

A developer has to identify a method in an 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 DML 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

A developer must create a ShippingCalculator class that cannot be instantiated and must include a working default implementation of a calculate method, that sub-classes can overrude. What is the correct implementation of the ShippingCalculator class?

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

A developer has a requirement to create a Case when a record on the Complaint__c object is created. Which two ways can this be solved? Choose 2 answers

Given the following trigger implementation: trigger leadTrigger on Lead (before update){ final ID BUSINESS_RECORDTYPEID = '012500000009Qad'; for(Lead thisLead: Trigger.new){ if(thisLead.Company != null && thisLead.RecordTypeId != BUSINESS_RECORDTYPEID){ thisLead.RecordTypeId = BUSINESS_RECORDTYPEID; } } } The developer receivers deployment errors every time a deployment is attempted from Sandbox to Production. What should the developer do to ensure a successful deployment?

Universal Containers(UC) decides it will not to send emails to support personnel directly from Salesforce in the event that an unhandled exception occurs. Instead, UC wants an external system be notified of the error. What is the appropriate publish/subscribe logic to meet these requirements?