Salesforce CRT 450 Exam Page 3(Dumps)
Question No:-21
|
What is a capability of the <ltng:require> tag that is used for loading external Javascript libraries in Lightning Component? (Choose three.)
1. Loading files from Documents.
2. One-time loading for duplicate scripts.
3. Specifying loading order.
4. Loading scripts in parallel.
5. Loading externally hosted scripts.
|
Question No:-22
|
A Platform Developer needs to write an Apex method that will only perform an action if a record is assigned to a specific Record Type.
Which two options allow the developer to dynamically determine the ID of the required Record Type by its name? (Choose two.)
1. Make an outbound web services call to the SOAP API.
2. Hardcode the ID as a constant in an Apex class.
3. Use the getRecordTypeInfosByName() method in the DescribeSObjectResult class.
4. Execute a SOQL query on the RecordType object.
|
Question No:-23
|
A developer has the controller class below.
<I>
public with sharing class myFooController
{
public integer prop { get; private set; }
}
</I>
Which code block will run successfully in an execute anonymous window?
1. myFooController m = new myFooController(); System.assert(m.prop !=null);
2. myFooController m = new myFooController(); System.assert(m.prop ==0);
3. myFooController m = new myFooController(); System.assert(m.prop ==null);
4. myFooController m = new myFooController(); System.assert(m.prop ==1);
Answer:-3. myFooController m = new myFooController(); System.assert(m.prop ==null);
|
|
Question No:-24
|
In a single record, a user selects multiple values from a multi-select picklist.
How are the selected values represented in Apex?
1. As a List<String> with each value as an element in the list
2. As a String with each value separated by a comma
3. As a String with each value separated by a semicolon
4. As a Set<String> with each value as an element in the set
Answer:-3. As a String with each value separated by a semicolon
|
|
Question No:-25
|
A developer writes the following code:
<I>
List<Account> acc = [SELECT Id FROM Account LIMIT 10];
Delete acc;
Database.emptyRecycleBin(acc);
System.Debug(Limits.getDMLStatements() +', '+ Limits.getLimitDMLStatements());
</I>
What is the result of the debug statement?
1. 1, 100
2. 1, 150
3. 2, 150
4. 2, 200
|
Question No:-26
|
What are two valid options for iterating through each Account in the collection List<Account> named AccountList? (Choose two.)
1. for (Account theAccount : AccountList) {ג€¦}
2. for(AccountList) {ג€¦}
3. for (List L : AccountList) {ג€¦}
4. for (Integer i=0; i < AccountList.Size(); i++) {ג€¦}
|
Question No:-27
|
Given:
Map<ID, Account> accountMap = new Map>ID, Account> ([SELECT Id, Name FROM Account]);
What are three valid Apex loop structures for iterating through items in the collection? (Choose three.)
1. for (ID accountID : accountMap.keySet()) {ג€¦}
2. for (Account accountRecord : accountMap.values()) {ג€¦}
3. for (Integer i=0; I < accountMap.size(); i++) {ג€¦}
4. for (ID accountID : accountMap) {ג€¦}
5. for (Account accountRecord : accountMap.keySet()) {ג€¦}
|
Question No:-28
|
Universal Containers wants Opportunities to be locked from editing when reaching the Closed/Won stage.
Which two strategies should a developer use to accomplish this? (Choose two.)
1. Use a Visual Workflow.
2. Use a validation rule.
3. Use the Process Automation Settings.
4. Use a Trigger.
|
Question No:-29
|
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?
1. Create a Sharing Rule comparing the custom object owner to the account owner.
2. Create a validation rule on the custom object comparing the record owners on both records.
3. Include the sharing related list on the custom object page layout.
4. Ensure that the relationship between the objects is Master-Detail.
Answer:-4. Ensure that the relationship between the objects is Master-Detail.
|
|
Question No:-30
|
An org has a single account named `˜NoContacts' that has no related contacts. Given the query:
List<Account> accounts = [Select ID, (Select ID, Name from Contacts) from Account where Name=`˜NoContacts'];
What is the result of running this Apex?
1. accounts[0].contacts is invalid Apex.
2. accounts[0].contacts is an empty Apex.
3. accounts[0].contacts is Null.
4. A QueryException is thrown.
Answer:-2. accounts[0].contacts is an empty Apex.
|
|
|