Platform Developer I Mock 1 09/12/2022 by Miquel Espinosa 0 Comments Welcome to your Platform Developer I Mock 1 Which two characteristics are true for Aura component events? Choose 2 answers The event propagates to every owner in the containment hierarchy. Only parent components that create subcomponents(either in their markup or programmatically) can handle events. lf a container component needs to handle a component event, add a handleFacets="true" attribute to its handler. Depending on the current propagation phase, calling event.stopPropagation( ) may not propagation. On a brand new developer org, a developer writes a single trigger named AccountTrigger on the Account object to perform complex validations on the after insert and after update DML events. A Salesforce administrator creates a Process Builder to update a custom field within the same object every time an Account is created or updated. How many times will the AccountTrigger fire if a new Account is inserted, assuming no other automation logic is implemented on the Account? 1 2 6 4 Ninguna Universal Containers uses Service Cloud with a custom field, stage_c, on the Case object. Management wants to send a follow-up email reminder 6 hours after the stage_c field is set to "Waiting on Customer". The Salesforce Administrator wants to ensure the solution used is bulk safe. Which automation tool should a developer recommend to meet these business requirements? Record-Triggered Flow Entitlement Process Scheduled Flow Einstein Next Best Action Ninguna A developer is tasked with performing a complex validation using Apex as part of advanced business logic. When certain criteria are met for a PurchaseOrder, the developer must throw a custom exception. What is the correct way for the developer to declare a class that can be used as an exception? public class PurchaseOrderException implements Exception{} public class PurchaseOrder extends Exception{} public class PurchaseOrderException extends Exception{) public class PurchaseOrder implements Exception{} Ninguna A Salesforce Administrator is creating a record-triggered flow. When certain criteria are met, the flow must call an Apex method to execute a 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? @future @AuraEnabled @InvocableMethod @RemoteAction Ninguna 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? An Apex REST class An outbound message An Apex controller An invocable method Ninguna Which process automation should be used to post a message to Chatter without using Apex code? Outbound Message Entitlement Process Strategy Builder Flow Builder Ninguna 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? lightning-flow aura: flow lightning: flow aura-flow Ninguna An Opportunity needs to have an amount rolled up from a custom object that is not in a master-detail relationship. How can this be achieved? Write a trigger on the child object and use a red-black tree sorting to sum the amount for all related child objects under the Opportunity. Write a Process Builder that links the custom object to the Opportunity. Write a trigger on the child object and use an aggregate function to sum the amount for all related child objects under the Opportunity. Use the Streaming API to create real-time roll-up summaries. Ninguna Which statement describes the execution order when triggers are associated to the same object and event? Trigger execution order cannot be guaranteed. Triggers are executed in the order they are created. Triggers are executed alphabetically by trigger name. Triggers are executed in the order they are modified. Ninguna Given the following code snippet, that is part of a custom controller for a Visualforce page: public void updateContact(Contact thisContact) { thisContact.Is_Active__c = false; try{ update thisContact; }catch(Exception e) { String errorMessage = 'An error occurred while updating the Contact. ' + e.getMessage()); ApexPages.addmessage(new ApexPages.message(ApexPages.severity.FATAL.errorMessage)); } } In which two ways can the try/catch be enclosed to enforce object and field-level permissions and prevent the DML statement from being executed if the current logged-in user does not have the appropriate level of access? Choose 2 answers Use if (thisContact.OwnerId == UserInfo.getUserId()) Use if (Schema.sObjectType.Contact.isUpdatable()) Use if (Schema.sObjectType.Contact.isAccessible()) Use if (Schema.sObjectType.Contact.fields.Is_Active__c.isUpdateable()) What can be developed using the Lightning Component framework? Dynamic web sites Hosted web applications Salesforce integrations Single-page web apps Ninguna A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple sObjects. 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 String nextPage = controller.save( ).getUrl( ); Test.setCurrentPage(pageRef); insert pageRef; ApexPages.currentPage( ).getParameters( ).put('input', 'TestValue'); public ExtendedController(ApexPages.StandardController cntrl) { } 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? AppExchange Developer Console Visual Studio Code IDE Setup Menu Ninguna Which two statements are true about Getter and Setter methods as they relate to Visualforce? Choose 2 answers Getter methods can pass a value from a controller to a page. There is no guarantee for the order in which Getter or Setter methods are executed. Setter methods always have to be declared global. Setter methods can pass a value from a controller to a page. 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? An error condition formula on a validation rule on Opportunity A record trigger flow on the Opportunity object An approval process on the Opportunity object An Apex trigger on the Opportunity object Ninguna What are two ways that a controller and extension can be specified for a custom object named Notice on a Visualforce page? Choose 2 answers apex:page controller = "Notice__c" extensions="myControllerExtension" apex:page standardController = "Notice__c" extensions="myControllerExtension" apex:page controllers = "Notice__c, myControllerExtension" apex:page = Notice extends = "myControllerExtension" Which three resources in an Aura Component can contain JavaScript functions? Choose 3 answers Helper Controller Style Design Renderer Which three Salesforce resources can be accessed from a Lighting web component? Choose 3 answers All external libraries Static resources Content asset files Third-party web components SVG resources What should a developer use to script the deployment and unit test execution as part of continuous Integration? Execute Anonymous VS Code Developer Console Salesforce CLI Ninguna 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 Rollup summary fields can cause the parent record to go through Save. The trigger may fire multiple times during a transaction. Duplicate rules are executed once all DML operations commit to the database. The validation rules will cause the trigger to fire again. Which two sfdx commands can be used to add testing data to a Developer sandbox? Choose 2 answers force:data:tree:import force: data:object:create force:data:bulk:upsert force:data:async:apsert Which three statements are accurate about debug logs? Choose 3 answers Debug log levels are cumulative; where FINE log level includes all events logged at the DEBUG, INFO,WARN,and ERROR levels. The maximum size of a debug log is 5 MB. Only the 20 most recent debug logs for a user are kept. Debug logs can be set for specific users, classes, and triggers. System debug logs are retained for 24 hours. 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 Use the @isTest(seeAllData=true)annotation in the test class. Create a static resource containing test data. Use Test.loadData to populate data in your test methods. Use the @isTest(isParallel=true) annotation in the test class. How should a developer write unit tests for a private method in an Apex class? Use the TestVisible annotation. Add a test method in the Apex class. Use the SeeAlIData annotation. Mark the Apex class as global. Ninguna 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 Apex classes must have at least 75% code coverage org-wide. Test methods must be declared with the testMethod keyword. At least one line of code must be executed for the Apex trigger. All methods in the test classes must use QisTest. What should a developer do to check the code coverage of a class after running all tests? Select and run the class on the Apex Test Execution page in the Developer Console. View the Code Coverage column in the list view on the Apex Classes page. View the Code Coverage percentage for the class using the Overall Code Coverage panel in the Developer Console Tests tab. View the Class Test Percentage tab on the Apex Class list view in Salesforce Setup. Ninguna What are three characteristics of change set deployments? Choose 3 answers Deployment is done in a one-way, single transaction. Change sets can deploy custom settings data. Change sets can only be used between related organizations. Change sets can be used to transfer records. Sending a change set between two orgs requires a deployment connection. Which three statements are accurate about debug logs? Choose 3 answers Amount of information logged in the debug log can be controlled by the log levels. To View Debug Logs, "Manager Users or "View AI Data" permission is needed. Debug Log levels are cumulative, where FINE log level includes all events logged at the DEBUG, INFO, WARN, and ERROR levels. Amount of information logged in the debug log can be controlled programmatically. To View Debug Logs, "Manager users" or "Modify All Data" permission is needed. Universal Containers has created a unique process for tracking container repairs. A custom field, Status_c has been created within the container_c custom object. A developer is tasked with sending notifications to multiple external systems every time the value of the status_c picklist changes. Which two tools should the developer use to meet the business requirement and ensure low maintenance of the solution? Choose 2 answers Record-Triggered flow Apex trigger Apex callouts Platform event Universal Hiring is using Salesforce to capture job applications. A salesforce administrator objects; Job_c acting as the master object, Job_Application_c acting as the detail. Within the Job_c object, a custom multi-select picklist, Preferred Locations__c, contact states for the position. Each Job Application_c record relates to a Contact within the master-detail relationship. Recruiters have requested the ability to view whether the Contact's Mailing State value on the Preferred_Locations_c field ,within the Job App1icacion_c record. Recruiters be kept in sync, If changes occur to the Contact's Mailing State or if the Job's Preferred updated. What is the recommended tool a developer should use to meet the business requirements? Apex trigger Record-triggered flow Formula field Process Builder Ninguna A large corporation stores Orders and Line Items in Salesforce for different lines of business. Users are allowed see Orders across the entire organization, but for security purposes, should only be able to see the Line Orders in their line of business. Which type of relationship should be used between Line Items and Orders? Master-Detail Lookup Direct Lookup Indirect Lookup Ninguna What is an example of a polymorphic lookup field in Salesforce? The WhatId field on the standard Event object B.A custom field, Link_c, on the standard Contact object that looks up to an Account The LeadId and ContactId fields on the standard Campaign Member object The ParentId field on the standard Account object Ninguna When a user edits the Postal Code on an Account, a custom Account text field named "Tim updated based on the values in another custom object called PostalCodeToTimezone_c. What is the optimal way to implement this feature? Create an account approval process Build a flow with Flow Builder. Create a formula field. Build an account assignment rule. Ninguna In terms of the MVC paradigm, what are two advantages of implementing the view layer of application using Lightning Web Component-based development over Visualforce? Built-in standard and custom set controllers Log capturing via the Debug Logs Setup page Self-contained and reusable units of an application Rich component ecosystem Universal Containers(UC) uses a custom object called Vendor. The Vendor custom object has relationship with the standard Account object. Based on some internal discussions, the UC administrator tried to change the master-detail lookup relationship, but was not able to do so. What is a possible reason that this change was not permitted? The organization wide default for the Vendor object is Public Read/Write. Some of the Vendor records have null for the Account field. The Account object has a roll-up summary field on the Vendor object. The Account object does not allow changing a field type for a custom field. Ninguna Universal Containers has a support process that allows users to request support from its engineering team using 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? Lookup field from Engineering_Support_c to Opportunity Master-detail field from EngineeringSupport_c to Opportunity Lookup field from Opportunity to Engineering Support_c Master-detail field from Opportunity to Engineering Support_c Ninguna 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_effect_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? Share the parent Case and Defect_c records. Share the parent Case record. Share the case_Defect_c record. Share the parent Defect_c record. Ninguna Universal Containers has implemented an order management application. Each Order can have one or more Order Line items. The order Line object is related to the Order via a master-detail relationship. For each Order Line item, the total price is calculated by multiplying the Order Line item price with the quantity ordered. What is the best practice to get the sum of all Order Line item totals on the Order record? Roll-up summary field Quick action Apex trigger Formula field Ninguna Which two settings must be defined in order to update a record of a junction object? Choose 2 answers Read/write access on the primary relationship Read/write access on the junction object Read/write access on the secondary relationship Read access on the primary relationship What can be used to override the Account's standard Edit button for Lightning Experience? Lightning action Lightning component Lightning page Lightning flow Ninguna An Opportunity needs to have an amount rolled up from a custom object that is not in a master-detail relationship. How can this be achieved? Write a trigger on the Opportunity object and use an aggregate function to sum the amount for all related child objects under the Opportunity. Use the Metadata API to create real-time roll-up summaries. Use the Streaming API to create real-time roll-up summaries. Write a trigger on the child object and use an aggregate function to sum the amount for all related child objects under the Opportunity. Ninguna 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? Master-detail field from Applicant to Job Junction object between Applicant and Job Lookup field from Applicant to Job Formula field on Applicant that references Job Ninguna A developer created a custom order management app that uses an Apex class. The order is represented by an Order object and an OrderItem 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 OrderItem records to a new Order record? Select the Allow reparenting option on the master-detail relationship. Change the master-detail relationship to an external lookup relationship. Add without sharing to the Apex class declaration. Create a junction object between OrderItem and Order. Ninguna A business has a proprietary Order Management System (OMS) that creates orders from their website and the orders.When the order Is created in the OMS,an integration also creates an order record In Salesforce relates it to the contact as identified by the email on the order As the order goes through different stages inOMS, the integration also updates it in Salesforce. It is noticed that each update from the OMS creates new order record in Salesforce. Which two actions will prevent the duplicate order records from being created in Salesforce? Ensure that the order number in the OMS is unique Use the order number from the OMS as an external ID. Use the email on the contact record as an external ID. Write a before trigger on the order object to delete any duplicates 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 new ParityException('parity does not match'); throw new ParityException('parity does not match'); throw new ParityException (); new ParityException(); An Approval Process is defined in the Expense_Item_c object. A business rule dictates that whenever a changes the Status to 'Submitted' on an Expense _Report_ c record, all the Expense_Item_c records related the expense report must enter the approval process individually. A developer is asked to explore if this automation can be implemented without writing any Apex code. Which statement is true regarding this automation request? This can only be automated with Apex code. This approval step cannot be automated and must be done manually. The developer can use Einstein Next Best Actions. The developer can use a record triggered flow with Actions. Ninguna A developer migrated functionality from JavaScriptRemoting to a Lightning web component and existing getopportunities() method to provide data. Which modification to the method Is necessary? The method must be decorated with (cacheable=true). The method must be decorated with @AuraEnabled. The method must return a JSON Object. The method must return a String of serialized JSON Array. Ninguna Which two process automations can be used on their own to send Salesforce Outbound Message? Choose 2 answers Process Builder Workflow Rule Flow Builder Strategy Builder The orderHelper class is a utility class that contains business logic for processing orders. Consider the code snippet: public class without sharing OrderHelper{ //code implementation. } A developer needs to create a constant named DELIVERY_MULTIPLIER with a value of 4.15, The value of instant should not change at any time in the code. How should the developer declare the DELIVERY_MULTIPLIER Constant to meet the business objectives? static decimal DELIVERY MULTIPLIER =4.15; static final decimal DELIVERY MULTIPLIER =4.15; decimal DELIVERY MULTIPLIER =4.15; constant decimal DELIVERY MULTIPLIER =4.15; Ninguna Managers at Universal Containers want to ensure that only decommissioned containers are able the system. To meet the business requirement a Salesforce developer adds "Decommissioned" for the status_c custom field within the container_c object. Which tool should the developer use to enforce only Container records with a status of "Decommissioned" delated? After record-triggered flow validation rule Before record-triggered flow Apex trigger Ninguna A company has been adding data to Salesforce and has not done a good job of limiting the creation of duplicate Lead records. The developer is considering writing an Apex process to identify duplicates and merge the records together. Which two statements are valid considerations when using merge? Choose 2 answers The field values on the master record are overwritten by the records being merged. The merge method allows up to three records, including the master and two additional records with the same sObject type, to be merged into the master record. External ID fields can be used with the merge method. Merge is supported with accounts, contacts, cases, and leads. A business implemented a gamification 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 customers for all completed videos. When the video is marked as completed in Salesforce, an external webservice 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 call to an external web service. However, a Syetem,Cal1outException is occurring. What should the developer do to fix this error? Move the callout to an asynchronous method with @future(callout=true) annotation. Replace the after update trigger with a before insert trigger. Surround the external call with a try-catch block to handle the exception. Write a REST service to integrate with the external web service. Ninguna 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. Which two automation tools can be used to implement this feature? Choose 2 answers Before-save flow Approval process Quick actions Account trigger A developer wants to invoke an outbound message when a record meets a specific criteria. Which two features satisfy this use case? Choose 2 answers Flow Builder can be used to check the record criteria and send an outbound message. Next Best Action can be used to check the record criteria and send an outbound message. Entitlement Process can be used to check the record criteria and send an outbound message without Apex code. Approval Process can be used to check the record criteria and send an outbound message without Apex code. What are two use cases for executing Anonymous Apex code? Choose 2 answers To add unit test code coverage to an org To run a batch Apex case to update all Contacts To delete 15,000 inactive Accounts in a single transaction after a deployment To schedule an Apex class to run periodically 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 all it's trainers? SELECT Id,(SELECT Id FROMTrainer_c)FROM Gym__c WHERE Name = "Viridian City Gym' SELECT ID FROM Trainer__c WHEREGym_r.Name = 'Viridian city Gym' SELECT Id,(SELECT Id FROM Trainers_c)FROM Gym_c WHERE Name = 'Viridian City Gym' SELECT Id,(SELECT Id FROMTrainer__r)FROM Gym_c WHERE Name = 'Viridian City Gym' Ninguna The Salesforce Administrator created a custom picklist field Account_status_c, on the Account object. This picklist has possible values of "Inactive" and "Active". As part of a new business process, management wants to ensure an opportunity record is created only for Accounts marked as Active. A developer is asked to implement this business requirement. Which automation tool should be used to fulfill the business need? Entitlement Process Salesforce Flow Outbound Messaging Approval Process Ninguna Time's up