최신Salesforce Platform Developer II - PDII무료샘플문제
문제1
Refer to the test method below:
Java
@isTest
static void testAccountUpdate() {
Account acct = new Account(Name = 'Test');
acct.Integration_Updated__c = false;
insert acct;
CalloutUtil.sendAccountUpdate(acct.Id);
Account acctAfter = [SELECT Id, Integration_Updated__c FROM Account WHERE Id = :acct.Id][0]; System.assert(true, acctAfter.Integration_Updated__c);
}
The test method calls a web service that updates an external system with Account information and sets the Account's Integration_Updated__c checkbox to True when it completes. The test fails to execute and exits with an error: "Methods defined as TestMethod do not support Web service callouts." What is the optimal way to fix this?
Refer to the test method below:
Java
@isTest
static void testAccountUpdate() {
Account acct = new Account(Name = 'Test');
acct.Integration_Updated__c = false;
insert acct;
CalloutUtil.sendAccountUpdate(acct.Id);
Account acctAfter = [SELECT Id, Integration_Updated__c FROM Account WHERE Id = :acct.Id][0]; System.assert(true, acctAfter.Integration_Updated__c);
}
The test method calls a web service that updates an external system with Account information and sets the Account's Integration_Updated__c checkbox to True when it completes. The test fails to execute and exits with an error: "Methods defined as TestMethod do not support Web service callouts." What is the optimal way to fix this?
정답: A
설명: (ExamPassdump 회원만 볼 수 있음)
문제2
Consider the Apex class below that defines a RemoteAction used on a Visualforce search page.
Java
global with sharing class MyRemoter {
public String accountName { get; set; }
public static Account account { get; set; }
public MyRemoter() {}
@RemoteAction
global static Account getAccount(String accountName) {
account = [SELECT Id, Name, NumberOfEmployees FROM Account WHERE Name = :accountName]; return account;
}
}
Which code snippet will assert that the remote action returned the correct Account?
Consider the Apex class below that defines a RemoteAction used on a Visualforce search page.
Java
global with sharing class MyRemoter {
public String accountName { get; set; }
public static Account account { get; set; }
public MyRemoter() {}
@RemoteAction
global static Account getAccount(String accountName) {
account = [SELECT Id, Name, NumberOfEmployees FROM Account WHERE Name = :accountName]; return account;
}
}
Which code snippet will assert that the remote action returned the correct Account?
정답: C
설명: (ExamPassdump 회원만 볼 수 있음)
문제3
Which code snippet processes records in the most memory efficient manner, avoiding governor limits such as
"Apex heap size too large"?
Which code snippet processes records in the most memory efficient manner, avoiding governor limits such as
"Apex heap size too large"?
정답: D
설명: (ExamPassdump 회원만 볼 수 있음)
문제4
A Salesforce developer is hired by a multi-national company to build a custom Lightning application that shows employees their employment benefits and earned commissions over time. The application must acknowledge and respect the user's locale context for dates, times, numbers, currency, and currency symbols.
When using Aura components, which approach should the developer implement to ensure the Lightning application complies with the user's locale?3
A Salesforce developer is hired by a multi-national company to build a custom Lightning application that shows employees their employment benefits and earned commissions over time. The application must acknowledge and respect the user's locale context for dates, times, numbers, currency, and currency symbols.
When using Aura components, which approach should the developer implement to ensure the Lightning application complies with the user's locale?3
정답: D
설명: (ExamPassdump 회원만 볼 수 있음)
문제5
A company manages information about their product offerings in custom objects named Catalog and Catalog Item. Catalog Item has a master-detail field to Catalog, and each Catalog may have as many as 100,000 Catalog Items. Both custom objects have a CurrencyIsoCode text field that contains the currency code they should use. If a Catalog's CurrencyIsoCode changes, all of its Catalog Items' CurrencyIsoCodes should be changed as well. What should a developer use to update the CurrencyIsoCodes on the Catalog Items when the Catalog's CurrencyIsoCode changes?
A company manages information about their product offerings in custom objects named Catalog and Catalog Item. Catalog Item has a master-detail field to Catalog, and each Catalog may have as many as 100,000 Catalog Items. Both custom objects have a CurrencyIsoCode text field that contains the currency code they should use. If a Catalog's CurrencyIsoCode changes, all of its Catalog Items' CurrencyIsoCodes should be changed as well. What should a developer use to update the CurrencyIsoCodes on the Catalog Items when the Catalog's CurrencyIsoCode changes?
정답: A
설명: (ExamPassdump 회원만 볼 수 있음)
문제6
Which method should be used to convert a Date to a String in the current user's locale?
Which method should be used to convert a Date to a String in the current user's locale?
정답: D
설명: (ExamPassdump 회원만 볼 수 있음)
문제7
A developer is tasked with creating a Lightning web component that is responsive on various devices. Which two components should help accomplish this goal?
A developer is tasked with creating a Lightning web component that is responsive on various devices. Which two components should help accomplish this goal?
정답: B,C
설명: (ExamPassdump 회원만 볼 수 있음)
문제8
Given the following code:
Java
for ( Contact c : [SELECT Id, LastName FROM Contact WHERE CreatedDate = TODAY] )
{
Account a = [SELECT Id, Name FROM Account WHERE CreatedDate = TODAY LIMIT 5]; c.AccountId = a.Id; update c;
}
Assuming there were 10 Contacts and five Accounts created today, what is the expected result?
Given the following code:
Java
for ( Contact c : [SELECT Id, LastName FROM Contact WHERE CreatedDate = TODAY] )
{
Account a = [SELECT Id, Name FROM Account WHERE CreatedDate = TODAY LIMIT 5]; c.AccountId = a.Id; update c;
}
Assuming there were 10 Contacts and five Accounts created today, what is the expected result?
정답: B
설명: (ExamPassdump 회원만 볼 수 있음)
문제9
Universal Containers implements a private sharing model for Convention_Attendee__c. A lookup field Event_Reviewer__c was created. Management wants the event reviewer to automatically gain Read/Write access to every record they are assigned to. What is the best approach?
Universal Containers implements a private sharing model for Convention_Attendee__c. A lookup field Event_Reviewer__c was created. Management wants the event reviewer to automatically gain Read/Write access to every record they are assigned to. What is the best approach?
정답: B
설명: (ExamPassdump 회원만 볼 수 있음)
문제10
A developer is writing code that requires making callouts to an external web service. Which scenario necessitates that the callout be made in an asynchronous method?
A developer is writing code that requires making callouts to an external web service. Which scenario necessitates that the callout be made in an asynchronous method?
정답: A
설명: (ExamPassdump 회원만 볼 수 있음)
문제11
A developer created a class that implements the Queueable Interface, as follows:
Java
public class without sharing OrderQueueableJob implements Queueable {
public void execute(QueueableContext context) {
// implementation logic
System.enqueueJob(new FollowUpJob());
}
}
As part of the deployment process, the developer is asked to create a corresponding test class. Which two actions should the developer take to successfully execute the test class?1
A developer created a class that implements the Queueable Interface, as follows:
Java
public class without sharing OrderQueueableJob implements Queueable {
public void execute(QueueableContext context) {
// implementation logic
System.enqueueJob(new FollowUpJob());
}
}
As part of the deployment process, the developer is asked to create a corresponding test class. Which two actions should the developer take to successfully execute the test class?1
정답: A,D
설명: (ExamPassdump 회원만 볼 수 있음)
문제12
Part of a custom Lightning component displays the total number of Opportunities in the org, which are in the millions. The Lightning component uses an Apex method to get the data it needs. What is the optimal way for a developer to get the total number of Opportunities for the Lightning component?
Part of a custom Lightning component displays the total number of Opportunities in the org, which are in the millions. The Lightning component uses an Apex method to get the data it needs. What is the optimal way for a developer to get the total number of Opportunities for the Lightning component?
정답: C
설명: (ExamPassdump 회원만 볼 수 있음)
문제13
A large company uses Salesforce across several departments. Each department has its own Salesforce Administrator. It was agreed that each Administrator would have their own sandbox in which to test changes.
Recently, users notice that fields that were recently added for one department suddenly disappear without warning. Which two statements are true regarding these issues and resolution?3637
A large company uses Salesforce across several departments. Each department has its own Salesforce Administrator. It was agreed that each Administrator would have their own sandbox in which to test changes.
Recently, users notice that fields that were recently added for one department suddenly disappear without warning. Which two statements are true regarding these issues and resolution?3637
정답: B,D
설명: (ExamPassdump 회원만 볼 수 있음)