Salesforce Platform Developer 1 Set 3

Which three steps allow a custom SVG to be included in a Lightning web component? Choose 3 answers
Upload the SVG as a static resource
Import the static resource and provide a getter for it in JavaScript.
Reference the property in the HTML template.
Reference the import in the HTML template.
Import the SVG as a content asset file.
How does the Lightning Component framework help developers implement solutions faster?
By providing an Agile process with default steps
By providing code review standards and processes
By providing device-awareness for mobile and desktops
By providing change history and version control
Which two scenarios require an Apex method to be called imperatively from a Lightning web component?
Calling a method that makes a web service callout
Calling a method that is not annotated with cacheable=true
Calling a method with the click of a button
Calling a method that is external to the main controller for the Lightning web component
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.
 
What should a developer Implement to support these requirements?
Master-detail field from Engineering_Support c to Opportunity.
Master-detail field from Opportunity to Engineering_Support c
Lookup field from Engineering_support c to Opportunity
Lookup field from Opportunity to Engineering_Support c

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? 

Create a test class and methods to cover the Apex trigger
Run the tests using the 'Run All Tests' method.
Remove the falling test methods from the test class.
Increase the test class coverage on the helper class

Universal Containers recently transitioned from Classic to Lightning Experience. One of its business processes requires certain values from the Opportunity object to be sent via an HTTP REST callout to its external order management system based on an ad-hoc basis 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 

Create a Lightning component that performs the HTTP REST callout, and use a Lightning Action to expose the component on the Opportunity detail page.
Create a Process Builder on the Opportunity object that executes an Apex immediate action to perform the HTTP REST callout whenever the Opportunity is updated.
Create an after update trigger on the Opportunity object that calls a helper method using @Future(Callout=true) to perform the HTTP REST callout.
Create a Visualforce page that performs the HTTP REST callout, and use a Visualforce quick action to expose the component on the Opportunity detail page.

A developer created these three Rollup Summary fields in the custom object, Project_c! 

  • Total Timesheets__c 
  • Total Approved Timesheets_ c
  • Total Rejected_Timesheet_c 

The developer is asked to create a new field that shows the ratio between rejected and approved timesheets for a given project. 

Which should the developer use to implement the business requirement in order to minimize maintenance overhead? 

Record-triggered Flow
Formula field
Apex Trigger
Process Builder

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.
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.
Which Apex class contains methods to return the amount of resources that have been used for a particular governor, such as the number of DML statements?
Exception
Messaging
OrgLimits
Limits
A developer created this Apex trigger that calls MyClass .myStaticMethod:
 
trigger myTrigger on Contact(before insert)
(
MyClass.myStaticMethod(trigger.new, trigger.oldMap);
}

The developer creates a test class with a test method that calls MyClass.mystaticMethod, resulting in 81% overall code coverage.
 
What happens when the developer tries to deploy the trigger and two classes to
production, assuming no other code exist?
The deployment fails because the Apex trigger has no code coverage.
The deployment fails because no assertions were made in the test method.
The deployment passes because the Apex code has required (>75%) code coverage.
The deployment passes because both classes and the trigger were included in the deployment.
Which two settings must be defined in order to update a record of a junction object? Choose 2 answers
Read access on the primary relationship
Read/Write access on the secondary relationship
Read/Write access on the primary relationship
Read/Write access on the junction object
Universal Container(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?
Add a Master-Detail field on the Account object to the Global Address object
Add a Master-Detail field on the Account object to the Global Address object
Add a Lookup field on the Account object to the Global Address object.
Add a Lookup field on the Global Address object to the Account object
In terms of the MVC paradigm, what are two advantages of implementing the layer of a Salesforce application using Aura Component-based development over Visualforce? Choose 2 answers
Self-contained and reusable units of an application
Rich component ecosystem
Automatic code generation
Server-side run-time debugging
The sales management team at Universal Containers requires that the Lead Source field of the Lead record be populated when a Lead is converted.

What should be used to ensure that a user populates the Lead Source field prior to converting a Lead?
Process Builder
Validation Rule
Formula Field
Workflow Rule
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 permission for the currently logged-in user while using the custom search tool? 
Use the schema describe calls to determine if the logged-in users has access to the Account object.
Use the without sharing keyword on the class declaration.
Use the UserInfo Apex class to filter all SOQL queries to returned records owned by the logged-in user.
Use the with sharing keyword on the class declaration.
An org tracks customer orders on an Order object and the items of an Order on the Line Item object. The Line Item object has a MasterDetail relationship to the order object. A developer has a 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?
Implement the line amount as a numeric formula field and the order amount as a roll-up summary field.
Write a single before trigger on the Line Item that calculates the item amount and updates the order amount on the Order.
Implement the Line amount as a currency field and the order amount as a SUM formula field.
Implement the Line amount as a currency field and the order amount as a SUM formula field.
A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of test allowing them to test independent requirements various types of Salesforce Cases.

Which approach can efficiently generate the required data for each unit test?
Use @TestSetup with a void method.
Create test data before Test.startTest() in the unit test.
Add @isTest(seeAllData=true) at the start of the unit test class.
Create a nock using the Stud API
Universal Container is building a recruiting app with an Applicant object that stores information about an individual person that represents a job. Each application 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
Formula field on Applicant that references Job
Junction object between Applicant and Job
Lookup field from Applicant to Job
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_custom object. Which two automation tools can be used to implement this feature?
Choose 2 answers
Approval process
Account trigger
Fast Field Updates record-triggered flow
Quick actions

Universal Containers decides to use purely declarative development to build out a new Salesforce application. 

Which two options can be used to build out the business logic layer for this application? 

Choose Two:

Record-Triggered Flow
Remote Actions
Validation Rules
Batch Jobs
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?
A Visualforce page in Salesforce Classic and a Lightning component in Lightning Experience
A Lightning component in 5alesforce Classic and a Lightning component in lightning Experience
A Visualforce page in Salesforce Classic and a Lightning page in Lightning Experience
A Lightning page in Salesforce Classic and a Visualforce page in Lightning Experience

Refer to the following Apex code: 

Integer x=0; 

do{

x=1;

x++;

}

while (x < 1);

System.debug(x)

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

1
2
3
4
For which three items can a trace flag be configured?
Choose 3 answers
Process Builder
Visualforce
Apex Class
User
Apex Trigger
Assuming that name  is a String obtained by an <apex:inputText> tag on a Visualforce page.
Which two SOQL queries performed are safe from SOQL injections? Choose 2 answers
 
A. String query = 'SELECT Id FROM Account WHERE Name LIKE \''%' + name.noQuotes() + '%\''; List results = Database.query(query);
 
B. String query = 'SELECT Id FROM Account WHERE Name LIKE \''%' + String.escapeSingleQuotes(name) + '%\''; List results = Database.query(query);
 
C. String query = 'SELECT Id FROM Account WHERE Name LIKE \''%' + name + '%\''; List results = Database.query(query);
 
D. String query = '%' + name + '%'; List results = [SELECT Id FROM Account WHERE Name LIKE :query];
A
B
D
C
Which two operations affect the number of times a trigger can fire?
Choose 2 answers
 
Lightning Flows
Roll-Up Summary fields
Email messages
Criteria-based Sharing calculations
The values 'High', 'Medium', and 'Low' are Identified as common values for multiple picklist across different object. What is an approach a developer can take to streamline maintenance of the picklist and their values, while also restricting the values to the ones mentioned above?
Create the Picklist on each object and use a Global Picklist Value Set containing the Values.
Create the Picklist on each object as a required field and select "Display values alphabeticaly, not in the order entered
Create the Picklist on each object and select "Restrict picklist to the values defined in the value set
Create the Picklist on each and add a validation rule to ensure data integrity.

A developer is debugging the following code to determine why Accounts are not being created. 

List<Account> aceta = getAccounts (); 

Database.insert(acota, false); 

How should the code be altered to help debug the issue? 

Add a try-catch around the insert method.
Collect the insect method return value in a daveResul= variable.
Set the second insert method parameter to true.
Change the DML statement to insert acota.
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?
Add lightning_Recording to the statusComponent.je file.
Add target lightning_RecordPage to the statusComponent.ja-nets.xml file.
Add Account to the statuscomponent.ja-metal file
Set isExposed to true in the saturcomponent.ja-mata.xml file.
How should a developer write unit tests for a private method in an Apex class?
Use the SeeAllData annotation.
Add a test method in the Apex class.
Use the TestVisible annotation.
Mark the Apex class as global.
Refer to the code snippet below:
 
When a Lightning web component is rendered, a list of opportunities that match certain criteria should be retrieved from the database and displayed to the end-user.

Which three considerations must the developer implement to make the fetchOpportunities method available within the Lightning web component?
(Choose three.)
The method must specify the (cacheable=true) attribute.
The method must specify the (continuation=true) attribute.
The method must be annotated with the @AuraEnabled annotation.
The method must be annotated with the @InvocableMethod annotation.
The method must be annotated with the @InvocableMethod annotation.

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

SOSL is able to return more records.
SOQL is faster for text searches.
SOSL is faster for text searches.
SOQL is able to return more records.

A developer has to identify a method in en 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 SOQL 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?

Use the Database.Savepoint method to enforce database integrity.
Use the System.Limit class to monitor the current CPU governor limit consumption.
Use the @ReadOnly annotation to bypass the number of rows returned by a SOQL.
Use Partial DHL statements to ensure only valid data is committed.

A developer created a custom order management app that uses an Apex class. The order is represented by an  Order object and an Orderltem 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 Orderltem records to a new Order record?

Add without sharing to the Apex class declaration
Change the master-detail relationship to an external lookup relationship.
Create a junction object between Orderltem and Order.
Select the Allow reparenting option on the master-detail relationship.
A team of developers is working on a source-driven project that allows them to work independently, with many different org configurations. Which type of Salesforce orgs should they use for their development?
Developer sandboxes
Scratch orgs
Full Copy sandboxes
Developer orgs
A developer wants to import 500 Opportunity records into a sandbox. Why should the developer choose to use data Loader instead of Data Import Wizard?
Data Loader runs from the developer's browser.
Data Import Wizard does not support Opportunities.
Data Loader automatically relates Opportunities to Accounts.
Data Import Wizard can not import all 500 records
What are two ways a developer can get the status of an enqueued job for a class that queueable interface?
Choose 2 answers
View the apex status Page
View the apex flex Queue
View the apex Jobs page
Query the AsyncApexJob object
A development team wants to use a deployment script lo automatically deploy lo a sandbox during their development cycles.
 
Which two tools can they use to run a script that deploys to a sandbox? Choose 2 answers
Ant Migration Tool
SFDX CLI
Change Sets
Developer Console
A developer considers the following snippet of code:
 
Based on this code, what is the value of x?
1
2
3
4
A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple subjects. 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
Insert pageRef.
Test.setCurrentPage(pageRef);
Public ExtendedController(ApexPages StandardController cntrl) { }
ApexPages.CurrentPage().getParameters().put('input\’, 'TestValue');
String nextPage - controller.save().getUrl();
Which three statements are true regarding custom exceptions in Apex? (Choose three.)
A custom exception class must extend the system Exception class.
A custom exception class can implement one or many interfaces.
A custom exception class cannot contain member variables or methods.
A custom exception class name must end with “Exception”.
A custom exception class can extend other classes besides the Exception class.
What can be used to override the Account's standard Edit button for Lightning Experience?
Lightning action
Lightning component
Lightning page
Lightning flow
A developer must implement a CheckPaymentProcessor class that provides check processing payment capabilities that adhere to what 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. Public class CheckPaymentProcessor implements PaymentProcessor {
public void pay(Decimal amount) {}
}
B. Public class CheckPaymentProcessor implements PaymentProcessor {
public void pay(Decimal amount);
}
C. Public class CheckPaymentProcessor extends PaymentProcessor {
public void pay(Decimal amount);
}
D. Public class CheckPaymentProcessor extends PaymentProcessor {
public void pay(Decimal amount) {}
}
A
B
C
D
Since Aura application events follow the traditional publish-subscribe model, which method is used to fire an event?
ernit()
FireEvent()
Fire()
RegisterEvent()
Which three resources in an Azure Component can contain JavaScript functions?
Controllers
Helper
Design
Style
Renderer
While writing an Apex class, a developer wants to make sure that all functionality being developed is handled as specified by the requirements. Which approach should the developer use to be sure that the Apex class is working according to specifications?
Include a try/catch block to the Apex class.
Run the code in an Execute Anonymous block in the Developer Console.
Create a test class to execute the business logic and run the test in the Developer Console.
Include a savepoint and Database. rollback ().
Given the following Anonymous Block:
 
 
What should a developer consider for an environment that has over 10,000 Case records?
The transaction will fail due to exceeding the governor limit.
The try/catch block will handle any DML exceptions thrown.
The transaction will succeed and changes will be committed.
The transaction will succeed and changes will be committed.
A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violation to the user. How can the developer make sure that validation rule violations are displayed?
Add cuatom controller attributes to display the message.
Include <apex:message> on the Visualforce page.
Use a try catch with a custom exception class.
Perform the DML using the Database.upsert() method.

Universal Containers (UC) is developing a process for their sales teams that requires all sales reps to go through a set of scripted steps with each new customer they create. 

 

n the first step of collecting information, UC's ERP system must be checked via a REST endpoint to see if the customer exists. If the customer exists, the data must be presented to the sales rep in Salesforce. 

Which two (2) should a developer implement to satisfy the requirements?
Trigger
Invocable method
Flow
Future method
Which action causes a before trigger to fire by default for Accounts?
Renaming or replacing picklist
Importing data using the Data Loader and the Bulk API
Converting Leads to Contact accounts
Updating addresses using the Mass Address update tool
A develop completed modification 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?
Apex classes must have at least 75% code coverage org-wide.
At least one line of code must be executed for the Apex trigger.
All methods in the test classes must use @isTest
Test methods must be declared with the testMethod keyword.
A developer Is asked to create a Visualforce page that lists the contacts owned by the current user. This component will be embedded In a Lightning page. Without writing unnecessary code, which controller should be used for this purpose?
Standard list controller
Standard controller
Lightning controller
Custom controller
What should be used to create scratch orgs?
Developer Console
Salesforce CLI
Workbench
Sandbox refresh
Ursa Major Solar has a custom object, ServiceJob_e, with an optional Lookup field to Account called Partner_Service_Provider_c. The TotalJobe_ field on Account tracks the total number of serviceJob_e records to which a partner service provider Account is related. What is the most efficient way to ensure that the totalJobs field is kept up to date?
Create a schedule-triggered flow on serviceJob_c
Create a schedule-triggered flow on serviceJob_c
Change lobe to a roll-up summary field.
Create a record-triggered flow on ServiceJob_c.
Which statement describes the execution order when triggers are associated to the same object and event?
Trigger execution order cannot be guaranteed.
Trigger are executed In the order they are modified.
Triggers are executed alphabetically by trigger name.
Triggers are executed in the order they are created
A developer is migrating a Visualforce page into a Lightning web component. 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?
Lightning Data Service handles sharing rules and field-level security.
The isAccessible ( ) method must be used for field-level access checks
The with sharing keyword must be used to enforce sharing rules.
Lightining data service ignores field-level security
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?
Declare the class and method using the public access modifier.
Declare the class as global and use the public access modifier on the method.
Declare the class as public and use the global access modifier on the method.
Declare the class and method using the global access modifier.
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
Salesforce CLI
Visual Studio Core IDE
Developer Console
Which two are best practices when it comes to component and application event handling? (Choose two.)
Reuse the event logic in a component bundle, by putting the logic in the helper.
Use component events to communicate actions that should be handled at the application level.
Handle low-level events in the event handler and re-fire them as higher-level events.
Try to use application events as opposed to component events.
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 Postal Code To TimeZone_c custom object. How can a developer implement this feature?
Build an account assignment rule.
Build a workflow rule.
Build a flow with Flow Builder
Create a formular field
{"name":"Salesforce Platform Developer 1 Set 3", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Which three steps allow a custom SVG to be included in a Lightning web component? Choose 3 answers, How does the Lightning Component framework help developers implement solutions faster?, Which two scenarios require an Apex method to be called imperatively from a Lightning web component?","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Make your own Survey
- it's free to start.