Salesforce Certified Platform Developer I - CRT-450 模擬練習

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)

正解: A
解説: (PassTest メンバーにのみ表示されます)
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?

正解: B
解説: (PassTest メンバーにのみ表示されます)
What are three considerations when using the @lnvocableMethod annotation in Apex?
Choose 3 answers

正解: A,B,D
解説: (PassTest メンバーにのみ表示されます)
Which three steps allow a custom Scalable Vector Graphic (SVG) to be included in a Lightning web component?
Choose 3 answers

正解: B,C,D
解説: (PassTest メンバーにのみ表示されます)
Which two are best practices when it comes to Aura component and application event handling?
Choose 2 answers

正解: A,D
解説: (PassTest メンバーにのみ表示されます)
A Next Best Action strategy uses an Enhance Element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors.
What is the correct definition of the Apex method?

正解: A
解説: (PassTest メンバーにのみ表示されます)
The orderHelper class is a utility class that contains business logic for processing orders. Consider the following 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 the constant should not change at any time in the code.
How should the developer declare the delivery multiplier constant to meet the business objectives?

正解: A
解説: (PassTest メンバーにのみ表示されます)
A developer created these three Rollup Summary fields in the custom object, Project__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?

正解: C
解説: (PassTest メンバーにのみ表示されます)
A developer is tasked to perform a security review of the ContactSearch Apex class that exists in the system.
Within the class, the developer identifies the following method as a security threat:
ist<Contact> performSearch (String lastName} [
return Database.query('SELECT Id, FirstName, LastName FROM Contact WHERE LastName Like s'+lastName+'s'")?; What are two ways the developer can update the method to prevent a SOQL injection attack?
Choose 2 answers

正解: B,C
解説: (PassTest メンバーにのみ表示されます)
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,D
解説: (PassTest メンバーにのみ表示されます)