Salesforce CRT-450 Discount Pack 2021

Proper study guides for Up to the immediate present Salesforce Salesforce Certified Platform Developer I (SU18) certified begins with Salesforce CRT-450 preparation products which designed to deliver the Accurate CRT-450 questions by making you pass the CRT-450 test at your first time. Try the free CRT-450 demo right now.

NEW QUESTION 1
While writing a test class that covers an OpportunityLineItem trigger, a Developer is unable to create a standard PriceBook since one already exists in the org.
How should the Developer overcome this problem?

  • A. Use Test.getStandardPricebookId() to get the standard PriceBook ID.
  • B. Use @IsTest(SeeAllData=true) and delete the existing standard PriceBook.
  • C. Use Test.loadData() and a Static Resource to load a standard Pricebook.
  • D. Use @TestVisible to allow the test method to see the standard PriceBoo

Answer: A

NEW QUESTION 2
Which two platform features align to the Controller portion of MVC architecture? (Choose two.)

  • A. Process Builder actions
  • B. Workflow rules
  • C. Standard objects
  • D. Date fields

Answer: AB

NEW QUESTION 3
Which data structure is returned to a developer when performing a SOSL search?

  • A. A list of lists of sObjects.
  • B. A map of sObject types to a list of sObjects
  • C. A map of sObject types to a list oflists of sobjects
  • D. A list of sObject

Answer: A

NEW QUESTION 4
Which statement would a developer use when creating test data for products and pricebooks?

  • A. Id pricebookId = Test.getStandardPricebookId();
  • B. Pricebook pb = new Pricebook();
  • C. IsTest(SeeAllData = false);
  • D. List objList = Test.loadData(Account.sObjectType, 'myResource');

Answer: A

NEW QUESTION 5
What are two valid options for iterating through each Account in the collection List<Account> named AccountList? (Choose two.)

  • A. for (Account theAccount : AccountList) {…}
  • B. for(AccountList) {…}
  • C. for (List L : AccountList) {…}
  • D. for (Integer i=0; i < AccountList.Size(); i++) {…}

Answer: AD

NEW QUESTION 6
A developer creates an Apex helper class to handle complex trigger logic. How can the helper class warn users when the trigger exceeds DML governor limits?

  • A. By using PageReference.setRedirect() to redirect the user to a custom Visualforce page before the number of DML statements is exceeded.
  • B. By using Messaging.sendEmail() to continue toe transaction and send an alert to the user after the number of DML statements is exceeded.
  • C. By using AmexMessage.Messages() to display an error message after the number of DML statements is exceeded.
  • D. By using Limits.getDMLRows() and then displaying an error message before the number of DML statements is exceeded.

Answer: D

NEW QUESTION 7
Which approach should be used to provide test data for a test class?

  • A. Query for existing records in the database.
  • B. Execute anonymous code blocks that create data.
  • C. Use a test data factory class to create test data.
  • D. Access data in @TestVisible class variable

Answer: C

NEW QUESTION 8
What is the minimum log level needed to see user-generated debug statements?

  • A. DEBUG
  • B. FINE
  • C. INFO
  • D. WARN

Answer: A

NEW QUESTION 9
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 Sharing Rule comparing the custom object owner to the account owner.
  • B. Create a validation rule on the custom object comparing the record owners on both records.
  • C. Include the sharing related list on the custom object page layout.
  • D. Ensure that the relationship between the objects is Master-Detai

Answer: D

NEW QUESTION 10
When loading data into an operation, what can a developer do to match records to update existing records? (Choose 2)

  • A. Match an auto-generated Number field to a column in the imported file.
  • B. Match an external Id Text field to a column in the imported file.
  • C. Match the Name field to a column in the imported file.
  • D. Match the Id field to a column in the imported fil

Answer: BD

NEW QUESTION 11
Which tool allows a developer to send requests to the Salesforce REST APIs and view the responses?

  • A. REST resource path URL
  • B. Workbench REST Explorer
  • C. Developer Console REST tab
  • D. Force.com IDE REST Explorer tab

Answer: B

NEW QUESTION 12
A developer creates a method in an Apex class and needs to ensure that errors are handled properly.What would the developer use? (There are three correct answers.)

  • A. ApexPages.addErrorMessage()
  • B. A custom exception
  • C. .addError()
  • D. Database.handleException()
  • E. A try/catch construct

Answer: BCE

NEW QUESTION 13
A developer has the following trigger that fires after insert and creates a child Case whenever a new Case is created. List<Case> childCases = new List<Case>();for (Case parent : Trigger.new){Case child = new Case (ParentId = parent.Id, Subject = parent.Subject);childCases.add(child);}insert childCases; What happens after the code block executes?

  • A. Multiple child cases are created for each parent case in Trigger.new.
  • B. Child case is created for each parent case in Trigger.new.
  • C. The trigger enters an infinite loop and eventually fails.
  • D. The trigger fails if the Subject field on the parent is blan

Answer: B

NEW QUESTION 14
How can a developer avoid exceeding governor limits when using Apex Triggers? (Choose 2)

  • A. By using a helper class that can be invoked from multiple triggers
  • B. By using Maps to hold data from query results
  • C. By using the Database class to handle DML transactions
  • D. By performing DML transactions on a list of sObject

Answer: BD

NEW QUESTION 15
In the Lightning Component framework, where is client-side controller logic contained?

  • A. Apex
  • B. Visualforce
  • C. HTML
  • D. JavaScript

Answer: D

NEW QUESTION 16
A developer uses a before insert trigger on the Lead object to fetch the Territory c object, where the Territory c.PostalCode c matches the Lead.PostalCode. The code fails when the developer uses the Apex Data Loader to insert 10,000 Lead records. The developer has the following code block: Line-01: for (Lead l : Trigger.new){Line-02: if (l.PostalCode != null) {Line-03: List<Territory__c> terrList = [SELECT Id FROM Territory c WHERE PostalCode c = :l.PostalCode];Line-04: if(terrList.size() > 0) Line-05: l.Territory c = terrList[0].Id; Line-06: }Line-07: }Which line of code is causing the code block to fail?

  • A. Line-03: A SOQL query is located inside of the for loop code.
  • B. Line-01: Trigger:new is not valid in a before insert Trigger.
  • C. Line-02: A NullPointer exception is thrown if PostalCode is null.
  • D. Line-05: The Lead in a before insert trigger cannot be update

Answer: A

NEW QUESTION 17
What is a benefit of the Lightning Component framework?Choose 3 answers

  • A. It uses client-side Apex controllers for logic.
  • B. It uses a traditional publish-subscribe model.
  • C. It uses an event-driven architecture
  • D. It uses an MVC architectural design pattern.
  • E. It uses server-side JavaScript controller for logic.

Answer: BCD

NEW QUESTION 18
A method is passed a list of generic sObjects as a parameter.
What should the developer do to determine which object type (Account, Lead, or Contact, for example) to cast each sObject?

  • A. Use the first three characters of the sObject ID to determine the sObject type.
  • B. Use the getSObjectType method on each generic sObject to retrieve the sObject token.
  • C. Use the getSObjectName method on the sObject class to get the sObject name.
  • D. Use a try-catch construct to cast the sObject into one of the three sObject type

Answer: B

NEW QUESTION 19
Which statement should a developer avoid using inside procedural loops? (Choose 2)

  • A. System.debug('Amount of CPU time (in ms) used so far: ' + Limits.getCpuTime() );
  • B. List contacts = [SELECT Id, Salutation, FirstName, LastName, Email FROM Contact WHERE AccountId = :a.Id];
  • C. If(o.accountId == a.id)
  • D. Update contactList;

Answer: BD

NEW QUESTION 20
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 Visualforce page.
  • 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 custom controlle

Answer: D

NEW QUESTION 21
A developer has a unit test that is failing. To identify the issue, the developer copies the code inside the test method and executes it via the Execute Anonymous Apex Tool. The code then executes without failing. Why did the unit test failed, but not the Execute Anonymous?

  • A. The test method has a syntax error in the code.
  • B. The test method relies on existing data in the database
  • C. The test method use a try/catch block
  • D. The test method calls an @future metho

Answer: B

NEW QUESTION 22
How should a developer create a new custom exception class?

  • A. public class CustomException extends Exception{}
  • B. CustomException ex = new (CustomException)Exception();
  • C. public class CustomException implements Exception{}
  • D. (Exception)CustomException ex = new Exception();

Answer: A

NEW QUESTION 23
What is a valid statement about Apex classes and interfaces? Choose 2 answers:

  • A. The default modifier for a class is private.
  • B. Exception classes must end with the word exception.
  • C. A class can have multiple levels of inner classes.
  • D. The default modifier for an interface is privat

Answer: BD

NEW QUESTION 24
In which order does Salesforce execute events upon saving a record?

  • A. Before Triggers; Validation Rules; After Triggers; Assignment Rules; Workflow Rules; Commit
  • B. Validation Rules; Before Triggers; After Triggers; Workflow Rules; Assignment Rules; Commit
  • C. Before Triggers; Validation Rules; After Triggers; Workflow Rules; Assignment Rules; Commit
  • D. Validation Rules; Before Triggers; After Triggers; Assignment Rules; Workflow Rules; Commit

Answer: A

NEW QUESTION 25
A custom exception "RecordNotFoundException" is defined by the following code of block.public class RecordNotFoundException extends Exception()which statement can a developer use to throw a custom exception?choose 2 answers

  • A. Throw new RecordNotFoundException("problem occured");
  • B. Throw new RecordNotFoundException();
  • C. throw RecordNotFoundException("problem occured");
  • D. Throw RecordNotFoundException();

Answer: AB

NEW QUESTION 26
A developer created a lightning component name accountList.cmp that display a list of Accounts. Client-side logic that is executed when a user hovers over an account in the list should be stored in which bundle member?

  • A. AccountListHelper.js
  • B. AccountListRenderer.js
  • C. AccountList.renderer
  • D. AccountList.helper

Answer: C

NEW QUESTION 27
When the number of record in a recordset is unknown, which control statement should a developer use to implement a set of code that executes for every record in the recordset, without performing a .size() or .length() method call?

  • A. For (init_stmt, exit_condition; increment_stmt) { }
  • B. Do { } While (Condition)
  • C. For (variable : list_or_set) { }
  • D. While (Condition) { ... }

Answer: C

NEW QUESTION 28
......

P.S. Certifytools now are offering 100% pass ensure CRT-450 dumps! All CRT-450 exam questions have been updated with correct answers: https://www.certifytools.com/CRT-450-exam.html (211 New Questions)