Online Questions - Valid Practice To your CRT-450 Exam (Updated 364 Questions)
Practice To CRT-450 - Remarkable Practice On your Salesforce Certified Platform Developer I Exam
NEW QUESTION 189
What is the result of the debug statements in testMethod3 when you create test data using testSetup in below code?
- A. Account0.Phone=333-8781, Account1.Phone=333-8780
- B. Account0.Phone=333-8780, Account1.Phone=333-8781
- C. Account0.Phone=888-1515, Account1.Phone=999-1515
- D. Account0.Phone=888-1515, Account1.Phone=999-2525
Answer: B
NEW QUESTION 190
How should a developer write unit tests for a private method in an Apex class?
- A. Use the TestVisible annotation.
- B. Use the SeeAllData annotation.
- C. Add a test method in the Apex class.
- D. Mark the Apex class as global.
Answer: A
NEW QUESTION 191
What are two features of Heroku Connect? Choose 2 answers
- A. Displaying data from an external data store via External Objects.
- B. Bidirectional syncs, allowing data to be written into Salesforce
- C. Real Time Sync between Salesforce and Postgres
- D. Near Real Time Sync between Heroku Postgres and Salesforce
Answer: B,D
NEW QUESTION 192
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?
- A. The deployment fails because no assertions were made in the test method.
- B. The deployment passes because the Apex code has required (>75%) code coverage.
- C. The deployment passes because both classes and the trigger were included in the deployment.
- D. The deployment fails because the Apex trigger has no code coverage.
Answer: D
NEW QUESTION 193
hat are three techniques that a developer can use to invoke an anonymous block of code? Choose 3 answers
- A. Create and execute a test method that does not specify a runas() call
- B. Create a visualforce page that uses a controller class that is declared without sharing
- C. Type code into the developer console and execute it directly
- D. Type code into the execute anonymous tab in the force.com IDE and click execute
- E. Use the SOAP API to make a call to execute anonymous code
Answer: C,D,E
NEW QUESTION 194
A change set deployment from a sandbox to production fails due to a failure in a managed package unit test.
The developer spoke with the manager package owner and they determined it is a false positive and can be ignored. What should the developer do to successfully deploy?
- A. Select 'Run local tests' to run only the tests that are in the change set.
- B. Edit the managed package's unit test.
- C. Select 'Run local tests' to run all tests in the org that are not in the managed package.
- D. Select 'Fast Deploy' to run only the tests that are in the change set.
Answer: C
NEW QUESTION 195
Which is a valid Apex assignment?
- A. Float x = 5.0;
- B. Double x = 5;
- C. Integer x = 5.0;
- D. Integer x = 5*1.0;
Answer: B
NEW QUESTION 196
Given the following block code: try{ List <Accounts> retrievedRecords = [SELECT Id FROM Account WHERE Website = null]; }catch(Exception e){ //manage exception logic } What should a developer do to ensure the code execution is disrupted if the retrievedRecordslist remains empty after the SOQL query?
- A. Replace the retrievedRecords variable declaration from a List of Account to a single Account.
- B. Check the state of the retrieveRecords variable and throw a custom exception if the variable is empty.
- C. Check the state of the retrievedRecords variable and use System.assert(false) if the variable is empty
- D. Check the state of the retrievedRecords variable and access the first element of the list if the variable is empty.
Answer: C
NEW QUESTION 197
Universal Containers wants a list button to display a Visualforce page that allows users to edit multiple records. which Visualforce feature supports this requirement?
- A. RecordSetVar page attribute
- B. <apex:listButton> tag
- C. Custom controller
- D. Controller extension
Answer: A
NEW QUESTION 198
How should a developer prevent a recursive trigger?
- A. Use a private Boolean variable.
- B. Use a "one trigger per object" pattern.
- C. Use a static Boolean variable.
- D. Use a trigger handler.
Answer: C
Explanation:
Explanation/Reference:
NEW QUESTION 199
Potential home buyers working with a real estate company can make offers on multiple properties that are listed with the real estate company. Offer amounts can be modified; however, the property that has the offer cannot be modified after the offer is placed. What should be done to associate offers with properties in the schema for the organization?
- A. Create a lookup relationship in the offer custom object to the property custom object
- B. Create a master-detail relationship in the offer custom object to the property custom object
- C. Create a master-detail relationship in the contact object to both the property and offer custom objects
- D. Create a lookup relationship in the property custom object to the offer custom object
Answer: B
NEW QUESTION 200
A developer must create a CreditcardPayment class that provides an implementation of an existing Payment class. Public virtual class Payment { public virtual void makePayment(Decimal amount) {
/*implementation*/ } } Which is the correct implementation?
- A. Public class CreditCardPayment extends Payment {
public virtual void makePayment(Decimal amount) { /*implementation*/ }
} - B. Public class CreditCardPayment implements Payment {
public override void makePayment(Decimal amount) { /*Implementation*/ }
} - C. Public class CreditcardPayment extends Payment {
public override void makePayment(Decimal amount) { /*implementation*/ }
} - D. Public class CreditCardPayment implements Payment {
public virtual void makePayment(Decimal amount) { /*implementation*/ }
}
Answer: C
NEW QUESTION 201
How should a developer make sure that a child record on a custom object, with a lookup to the Account object, has the same sharing access as its associated account?
- A. Create a validation rule on the custom object comparing the record owners on both records.
- B. Include the sharing related list on the custom object page layout.
- C. Ensure that the relationship between the objects is Master-Detail.
- D. Create a Sharing Rule comparing the custom object owner to the account owner.
Answer: C
NEW QUESTION 202
A company wants to create an employee rating program that allows employees to rate each other. An employee's average rating must be displayed on the employee record. Employees must be able to create rating records, but are not allowed to create employee records.
Which two actions should a developer take to accomplish this task? (Choose two.)
- A. Create a master-detail relationship between the Rating and Employee objects.
- B. Create a roll-up summary field on the Employee and use AVG to calculate the average rating score.
- C. Create a trigger on the Rating object that updates a fields on the Employee object.
- D. Create a lookup relationship between the Rating and Employee object.
Answer: A,B
Explanation:
Explanation/Reference:
NEW QUESTION 203
A developer created a Visualforce page and a custom controller with methods to handle different buttons and events that can occur on the page.
What should the developer do to deploy to production?
- A. Create a test class that provides coverage of the custom controller.
- B. Create a test page that provides coverage of the Visualforce page.
- C. Create a test page that provides coverage of the custom controller.
- D. Create a test class that provides coverage of the Visualforce page.
Answer: A
NEW QUESTION 204
A developer needs an Apex method that can process Account or Contact records.
Which method signature should the developer use?
- A. public void doWork(Account Contact)
- B. public void doWork(Record theRecord)
- C. public void doWork(sObject theRecord)
- D. public void doWork(Account | | Contact)
Answer: C
NEW QUESTION 205
A developer has the following requirements:
Calculate the total amount on an Order.
Calculate the line amount for each Line Item based on quantity selected and price.
Move Line Items to a different Order if a Line Item is not stock.
Which relationship implementation supports these requirements?
- A. Order has a Lookup field to Line Item and there can be many Line Items per Order.
- B. Line Items has a Master-Detail field to Order and the Master can be re-parented.
- C. Line Item has a Lookup field to Order and there can be many Line Items per Order
- D. Order has a Master-Detail field to Line Item and there can be many Line Items per Order.
Answer: B
NEW QUESTION 206
A developer must implement a CheckPaymentProcessorclass that provides check processing payment capabilities that adhere to what is defined for payments in the PaymentProcessorinterface.
public interface PaymentProcessor {
void pay(Decimal amount);
}
Which is the correct implementation to use the PaymentProcessorinterface class?
public class CheckPaymentProcessor implements PaymentProcessor {
- A. publicvoid pay(Decimal amount);
public class CheckPaymentProcessor implements PaymentProcessor { - B. publicvoid pay(Decimal amount);
- C. publicvoid pay(Decimal amount){}
public class CheckPaymentProcessor extends PaymentProcessor { - D. publicvoid pay(Decimal amount){}
public class CheckPaymentProcessor extends PaymentProcessor {
Answer: D
NEW QUESTION 207
Which data structure is returned to a developer when performing a SOSL search?
- A. A map of sObject types to a list of sObjects
- B. A list of lists of sObjects.
- C. A map of sObject types to a list oflists of sobjects
- D. A list of sObjects.
Answer: B
NEW QUESTION 208
A company has a custom object named Region. Each account in salesforce can only be related to one region at a time, but this relationship is optional. Which type of relantionship should a developer use to relate an account to a region?
- A. Parent-child
- B. Master-detail
- C. Hierarchical
- D. Lookup
Answer: B
NEW QUESTION 209
Which requirement needs to be implemented by using standard workflow instead of Process Builder? Choose 2 answers
- A. Send an outbound message without Apex code.
- B. Copy an account address to its contacts.
- C. Create activities at multiple intervals.
- D. Submit a contract for approval.
Answer: A,B
NEW QUESTION 210
What can a Lightning Component contain in its resource bundle? Choose 2 answer
- A. Custom client side rendering behavior.
- B. Properties files with global settings
- C. CSS styles scoped to the component
- D. Build scripts for minification
Answer: A,C
NEW QUESTION 211
......
True CRT-450 Exam Extraordinary Practice For the Exam: https://www.topexamcollection.com/CRT-450-vce-collection.html
Get 100% Passing Success With True CRT-450 Exam: https://drive.google.com/open?id=1hiXZcbldGfL0w-F9ozD1-EC3RHHmonGp

