Q: 11
Consider the following code snippet:
apex
CopyEdit
public class with sharing AccountsController {
@AuraEnabled
public List getAllAccounts(){
return [SELECT Id, Name, Industry FROM Account];
}
}
Apex Test Class Snippet:
apex
CopyEdit
@isTest
private class with sharing AccountsController_Test {
@testSetup
private static void makeData(){
User user1 = [SELECT Id FROM User WHERE Profile.Name = 'System Administrator' AND isActive
= true LIMIT 1];
User user2 = [SELECT Id FROM User WHERE Profile.Name = 'Standard User' AND UserName =
'[email protected]' AND isActive = true LIMIT 1];
TestUtils.insertAccounts(10, user1.Id);
TestUtils.insertAccounts(20, user2.Id);
}
@isTest
private static void getAllAccounts_StandardUser_Test(){
List result = AccountsController.getAllAccounts();
System.assertEquals(20, result.size());
}
}
When the test class runs, the assertion fails.
Which change should the developer implement in the Apex test method to ensure the test method
executes successfully?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 12
A developer needs to confirm that a Contact trigger works correctly without changing the
organization's data.
What should the developer do to test the Contact trigger?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 13
Which three steps allow a custom Scalable Vector Graphic (SVG) to be included in a Lightning web
component?
Choose 3 answers
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 14
Which code in a Visualforce page and/or controller might present a security vulnerability?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 15
Which two are phases in the Aura application event propagation framework?
Choose 2 answers
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 16
The Job_Application__c custom object has a field that is a master-detail relationship to the Contact
object, where the Contact object is the master.
As part of a feature implementation, a developer needs to retrieve a list containing all Contact
records where the related Account Industry is 'Technology', while also retrieving the Contact's
Job_Application__c records.
Based on the object's relationships, what is the most efficient statement to retrieve the list of
Contacts?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 17
Consider the following code snippet:
public static List obtainAllFields(Set leadIds) {
List result = new List();
for (Id leadId : leadIds) {
result.add([SELECT FIELDS(ALL) FROM Lead WHERE Id = :leadId]);
}
return result;
}
Given the multi-tenant architecture of the Salesforce platform, what is a best practice a developer
should implement to ensure successful execution of the method?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 18
Universal Hiring uses Salesforce to capture job applications. A salesforce administrator created two
custom objects; Job__c acting as the master object, to Application_c acting as the detail.
Within the Job__c object, a custom multi-select picklist, preferred _Locations__c, contains a list of
approved states for the position. Each Job_Application__c record relates to a Contact within the
system through a master-detail relationship.
Recruiters have requested the ability to view whether the Contact's Mailing State value matches a
value selected on the Preferred Locations__c field, within the Job_Application__c record. Recruiters
would like this value to be kept in sync if changes occur to the Contact's Mailing State.
What is the recommended tool a developer should use to meet the business requirement?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 19
A development team wants to use a deployment script to automatically deploy to a sandbox during
their development cycles.
Which two tools can they use to run a script that deploys to a sandbox?
Choose 2 answers
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 20
A developer considers the following snippet of code:
Boolean isOK;
Integer x;
String theString = 'Hello';
if (isOK == false && theString == 'Hello') {
x = 1;
} else if (isOK == true && theString == 'Hello') {
x = 2;
} else if (isOK == null && theString == 'Hello') {
x = 3;
} else {
x = 4;
}
Based an this code, what is the value of x?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Question 11 of 20 · Page 2 / 2