
Get New 2021 Valid Practice Salesforce Developers CRT-450 Q&A - Testing Engine
CRT-450 Dumps PDF - 100% Passing Guarantee
NEW QUESTION 35
A developer creates a custom controller and custom Visualforce page by using the following code block:public class myController {public String myString;public String getMyString() {return 'getmyString';}public String getStringMethod1() {return myString;}public String getStringMethod2() {if (myString == null)myString = 'Method2';return myString;}}{!myString}, {!StringMethod1}, {!StringMethod2}, {!myString}What does the user see when accessing the custom page?
- A. , , Method2 , getMyString
- B. , , Method2,
- C. GetMyString , , ,
- D. GetMyString , , Method2 , getMystring
Answer: D
NEW QUESTION 36
A user selects a value from a multi-select picklist. How is this selected value represented in Apex?
- A. As a string
- B. As a string ending with a comma
- C. As a list< String > with one element
- D. As a set< string > with one element
Answer: A
NEW QUESTION 37
A Developer wants to get access to the standard price book in the org while writing a test class that covers an OpportunityLineItem trigger.
Which method allows access to the price book?
- A. Use @TestVisibleto allow the test method to see the standard price book.
- B. Use Test.loadData()and a Static Resource to load a standard price book.
- C. Use Test.getStandardPricebookId()to get the standard price book ID.
- D. Use @IsTest(SeeAllData=true)and delete the existing standard price book.
Answer: C
Explanation:
Explanation/Reference:
NEW QUESTION 38
A developer must provide a custom user interface when users edit a Contact. Users must be able to use the interface in Salesforce Classic and Lightning Experience. What should the developer do to provide the custom user interface?
- A. Override the Contact's Edit button with a Lightning page Salesforce Classic and a Visualforce page in Lightning Experience.
- B. Override the Contact's Edit button with a Lightning component in Salesforce Classic and a Lightning component in Lightning experience.
- C. Override the Contact's Edit button with a Visualforce page in Salesforce Classic and a Lightning page in Lightning experience.
- D. Override the Contact's Edit button with a Visualforce page in Salesforce Classic and a Lightning component in Lightning Experience.
Answer: D
NEW QUESTION 39
Which code block returns the ListView of an Account object using the following debug statement?
system.debug(controller.getListViewOptions() );
- A. ApexPages.StandardSetController controller = new ApexPages.StandardSetController( Database.getQueryLocator( 'SELECT Id FROM Account LIMIT 1'));
- B. ApexPages.StandardController controller = new ApexPages.StandardController( Database.getQueryLocator( 'SELECT Id FROM Account LIMIT 1'));
- C. ApexPages.StandardController controller = new ApexPages.StandardController( [SELECT Id FROM Account LIMIT 1]);
- D. ApexPages.StandardController controller = new ApexPages.StandardController( [SELECT Id FROM Account LIMIT 1]);
Answer: A
NEW QUESTION 40
When a task is created for a contact, how can a developer prevent the task from being included on the activity timeline of the contact's account record?
- A. By default,tasks do not display on the account activity timeline
- B. In activity settings,uncheck roll-up activities to a contact's primary account
- C. Use process builder to create a process to set the task account field to blank
- D. Create a task trigger to set the account field to NULL
Answer: B
NEW QUESTION 41
In the Lightning Component framework, where is client-side controller logic contained?
- A. Apex
- B. HTML
- C. JavaScript
- D. Visualforce
Answer: C
NEW QUESTION 42
Opportunity opp=[SELECT Id,StageName FROM Opportunity LIMIT 1]; Given the code above,how can a developer get the label for the StageName field?
- A. Call Opportunity.StageName.Label
- B. Call Opportunity.StageName.getDescribe().getLabel()
- C. Call Opp.StageName.getDescri
- D. Call Opp.StageName.Label
Answer: B
NEW QUESTION 43
What is the advantage of Salesforce Lightning?
- A. Option 3
- B. Pre-defined components to give Standard Look and Feel
- C. Option 4
- D. Uses service side for better handling
Answer: B
NEW QUESTION 44
Which is a valid Apex assignment?
- A. Integer x = 5.0;
- B. Integer x = 5*1.0;
- C. Double x = 5;
- D. Float x = 5.0;
Answer: C
NEW QUESTION 45
Which statement would a developer use when creating test data for products and pricebooks?
- A. List objList = Test.loadData(Account.sObjectType, 'myResource');
- B. Id pricebookId = Test.getStandardPricebookId();
- C. Pricebook pb = new Pricebook();
- D. IsTest(SeeAllData = false);
Answer: B
NEW QUESTION 46
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?
- A. Data Import Wizard can not import all 500 records.
- B. Data Loader automatically relates Opportunities to Accounts.
- C. Data Loader runs from the developer's browser.
- D. Data Import Wizard does not support Opportunities.
Answer: D
NEW QUESTION 47
What is a good practice for a developer to follow when writing a trigger? (Choose 2)
- A. Using @future methods to perform DML operations.
- B. Using the Set data structure to ensure distinct records.
- C. Using synchronous callouts to call external systems.
- D. Using the Map data structure to hold query results by ID.
Answer: B,D
NEW QUESTION 48
Which option would a developer use to display the Accounts created in the current week and the number of related Contacts using a debug statement in Apex?
- A. For(Account acc: [SELECT Id, Name, Account.Contacts FROM Account WHERE CreatedDate = THIS_WEEK]){ List cons = acc.Account.Contacts; System.debug(acc.Name + ' has ' + cons.size() + 'Contacts' }
- B. For(Account acc: [SELECT Id, Name, (SELECT Id, Name FROM Contacts) FROM Account WHERE CreatedDate = CURRENT_WEEK]){ List cons = acc.Contacts; System.debug(acc.Name + ' has ' + cons.size() + 'Contacts'); }
- C. For(Account acc:[SELECT Id, Name, Account.Contacts FROM Account WHERE CreatedDate = CURRENT_WEEK]) { List cons = acc.Account.Contacts; System.debug(acc.Name + ' has ' + cons.size() + 'Contacts'); }
- D. For(Account acc: [SELECT Id, Name,(SELECT Id, Name FROM Contacts) FROM Account WHERE CreatedDate = THIS_WEEK]) { List cons = acc.Contacts; System.debug(acc.Name + ' has ' + cons.size() + 'Contacts'; }
Answer: D
NEW QUESTION 49
What is a benefit of using a trigger framework?
- A. Reduces trigger execution time
- B. Simplifies addition of context-specific logic
- C. Increases trigger governor limits
- D. Allows functional code to be tested b
Answer: A
NEW QUESTION 50
A developer needs to create an audit trail for records that are sent to the recycle bin. Which type of trigger is most appropriate to create?
- A. After undelete
- B. Before delete
- C. After delete
- D. Before undelete
Answer: A
NEW QUESTION 51
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. Include the sharing related list on the custom object page layout.
- B. Create a validation rule on the custom object comparing the record owners on both records.
- C. Create a Sharing Rule comparing the custom object owner to the account owner.
- D. Ensure that the relationship between the objects is Master-Detail.
Answer: D
NEW QUESTION 52
A developer needs to create a custom Visualforce button for the Opportunity object page layout that will cause a web service to be called and redirect the user to a new page when clicked. Which three attributes need to be defined in the <apex:page> tag of the Visualforce page to enable this functionality? Choose three answers.
- A. Action
- B. Extensions
- C. Controller
- D. StandardController
Answer: A,B,D
NEW QUESTION 53
What should a developer use to implement an automatic Approval Process submission for Cases?
- A. An Assignment Rule
- B. A Workflow Rule
- C. Process Builder
- D. Scheduled Apex
Answer: C
NEW QUESTION 54
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. Hierarchical
- B. Parent-child
- C. Lookup
- D. Master-detail
Answer: D
NEW QUESTION 55
Which type of code represents the view in the MVC architecture on the Force.com platform?
- A. An apex method that executes SOQL to retrieve a list of cases
- B. Validation rules for a page layout that includes a related list of cases
- C. An apex method in an extension that returns a list of cases
- D. A visualforce page that dysplays information about case records by iterating over a list of cases
Answer: D
NEW QUESTION 56
A developer in a Salesforce org with 100 Accounts executes the following code using the Developer console:Account myAccount = new Account(Name = 'MyAccount');Insert myAccount;For (Integer x = 0; x < 150; x++)
{Account newAccount = new Account (Name='MyAccount' + x);try {Insert newAccount;} catch (Exception ex) {System.debug (ex) ;}}insert new Account (Name='myAccount');How many accounts are in the org after this code is run?
- A. 0
- B. 1
- C. 2
- D. 3
Answer: C
NEW QUESTION 57
A developer created a Visualforce page with a custom controller to show a list of accounts. The page uses the <apex:SelecList> component, with a variable called "selection", to show the valid values for Account.Type. The page uses an <apex:pageBlockTable> component to display the list of accounts, where the iteration variable is "acct". The developer wants to ensure that when a user selects a type on the <apex : selectList> component, only accounts with that type are shown on the page. What should the developer do to accomplish this?
- A. Use the onChange event to update the list of accounts in the controller when the value changes, and then re-render the pageBlockTable.
- B. Add the Rendered={!Acct.type==selection} attribute to the pageBlockTable component
- C. Create a component for each option and use a variable with hide parameter on the element.
- D. Create multiple lists in the controller that represent the relevant accounts for each account type when the page loads, then reference the correct one dynamically on the pageBlockTable.
Answer: A
NEW QUESTION 58
A developer has JavaScript code that needs to be called by controller functions in multiple Aura components by extending a new abstract component.
Which resource in the abstract Aura component bundle allows the developer to achieve this?
- A. controller.js
- B. renderer.js
- C. superRender.js
- D. helper.js
Answer: D
NEW QUESTION 59
An Account trigger updates all related Contacts and Cases each time an Account is saved using the following two DML statements:
update allContacts;
update allCases;
What is the result if the Case update exceeds the governor limit for maximum number of DML records?
- A. The Account save fails and no Contacts or Cases are updated.
- B. The Account save is retried using a smaller trigger batch size.
- C. The Account save succeeds and no Contacts or Cases are updated.
- D. The Account save succeeds, Contacts are updated, but Cases are not.
Answer: A
NEW QUESTION 60
......
Salesforce Certified Platform Developer CRT-450 Dumps will include below mentioned topics with Exam focused percentage
- Debug and Deployment Tools: 10%
- ISalesforce Fundamentals: 10%
- User Interface: 10%
- Data Modeling and Management: 12%
- Testing: 12%
- Logic and Process Automation: 46%
CRT-450 Braindumps Real Exam Updated on Dec 01, 2021 with 364 Questions: https://www.dumpstillvalid.com/CRT-450-prep4sure-review.html
Latest CRT-450 PDF Dumps & Real Tests Free Updated Today: https://drive.google.com/open?id=1C4PhUjtoO1YWT1IMsGUDZ-yxxffSAI2s
