Salesforce Certified Platform Developer I (SU24) Questions and Answers
A developer must implement a checkpaymentpbrocaessox class that provides check processing payment capabilities that adhere to what is defined for payments in the paymentProcsssor Interface.
Which implementation is correct to use the paymenterocesscr interface class?
A)
B)
C)
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?
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?
Which three statements are accurate about debug logs?
Choose 3 answers
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
How many Accounts will be inserted by the following block of code?
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?
What are two benefits of using declarative customizations over code? Choose 2 answers
Choose 2 answers
How is a controller and extension specified for a custom object named "Notice" on a Visualforce page?
A developer is tasked with building a custom Lightning web component to collect Contact information.
The form will be shared among many different types of users in the org. There are security requirements that only certain fields should be edited and viewed by certain groups of users.
What should the developer use in their Lightning Web Component to support the security requirements?
Which statement should be used to allow some of the records in a list of records to be inserted if others fail to be inserted?
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?
A developer identifies the following triggers on the Expense__c object:
The triggers process before delete, before insert, and before update events respectively.
Which two techniques should the developer implement to ensure trigger best practices are followed?
Choose 2 answers
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?
Universal Containers has developed custom Apex code and Lightning Components in a Sandbox environment. They need to deploy the code and associated configurations to the Production environment.
What is the recommended process for deploying the code and configurations to Production?
What are two use cases for executing Anonymous Apex code?
Choose 2 answers
What should a developer use to script the deployment and unit test execution as part of continuous integration?
Which statement describes the execution order when triggers are associated to the same object and event?
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 salarv < 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)
B)
C)
D)
A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violations to the user.
How can the developer make sure that validation rule violations are displayed?
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"?
A)
B)
C)
D)
Universal Containers hires a developer to build a custom search page to help users find the Accounts they want. Users will be able to search on Name, Description,
and a custom comments field.
Which consideration should the developer be aware of when deciding between SOQL and SOSL?
Choose 2 answers
Which two settings must be defined in order to update a record of a junction object? Choose 2 answers
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
A)
B)
C)
D)
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?
The following Apex method is part of the Contactservice class that is called from a trigger:
How should the developer modify the code to ensure best practices are met?
A)
B)
C)
D)
Which code statement includes an Apex method named updateaccounts in the class accountcontreoller for use in a Lightning web component?
Which three Salesforce resources can be accessed from a Lightning web component?
Choose 3 answers
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?
A)
B)
C)
D)
A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of tests allowing them to test independent requirements for various types of Salesforce Cases.
Which approach can efficiently generate the required data for each unit test?
Since Aura application events follow the traditional publish- subscribe model, which method is used to fire an event?
Which code displays the contents of a Visualforce page as a PDF?
A)
B)
C)
D)
For which three items can a trace flag be configured? Choose 3 answers
Universal Containers 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
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?
When using Salesforce DX, what does a developer need to enable to create and manage scratch orgs?
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?
Which annotation should a developer use on an Apex method to make it available to be wired to a property in a Lightning web component?
A)
B)
C)
D)
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 PoataliCodeToTimezcone o custom object.
Which two automation tools can be used to implement this feature?
Choose 2 answers
What Is the result of the following code?
What does the Lightning Component framework provide to developers?
Universal Containers recently transitioned from Classic to Lightning Experience.
One of its business processes requires certain values from the Opportunity cbject to be sent via an HTTP REST callout to its external order management system when the user presses a custom button
on the Opportunity detail page. Example values are as follows:
* Name
* Amount
* Account
Which two methods should the developer implement to fulfill the business requirement?
Choose 2 answers
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
A development team wants to use a deployment script to automatically deploy to a sandbox during their development cycles.
Which two tools can they use to run a script that deploys to a sandbox?
Choose 2 answers
Universal Containers has an order system that uses an Order Number to identify an order for customers and service agents. Order records will be imported into Salesforce.
How should the Order Number field be defined in Salesforce?
A developer must perform a complex SOQL query that joins two objects in a Lightning component.
How can the Lightning component execute the query?
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?
A developer created a trigger on a custom object. This custom object also has some dependent pick lists.
According to the order of execution rules, which step happens first?
A developer is alerted to an Issue with a custom Apex trigger that is causing records to be duplicated.
What is the most appropriate debugging approach to troubleshoot the issue?
Universal Containers wants to ensure that all new leads created in the system have a valid email address. They have already created a validation rule to enforce this requirement, but want to add an additional
layer of validation using automation.
What would be the best solution for this requirement?
Consider the following code snippet for a Visualforce page that is launched using a Custom Button on the Account detail page layout.
When the Save button is pressed the developer must perform a complex validation that involves multiple objects and, upon success, redirect the user to another Visualforce
page.
What can the developer use to meet this business requirement?
Universal Containers wants to back up all of the data and attachments in its Salesforce org once a month.
Which approach should a developer use to meet this requirement?