PD1

Тест создан 19 ноября 2022 г., автор aiperish.

Тест «PD1» состоит из 63 вопросов, был пройден 16 раз. Это тест «с ответами»: после его прохождения можно посмотреть правильные ответы и узнать свои ошибки.
...
What are two ways a developer can get the status of an enqueued job for a class that implements the queueable interface?

Choose 2 answers







...
"Which three statements are accurate about debug logs?

Choose 3 answers








...
"When a user edits the Postal Code on an Account, a custom Account text field named “Timezone” must be updated based on the values in a PostalCodeToTimezone__c custom object.

Which two automation tools can be used to Implement this feature?

Choose 2 answers







...
Which three resources in an Aura component can contain JavaScript functions?

Choose 3 answers








...
"A developer created a Lightning web component called statusComponent to be inserted into the Account record page.

Which two things should the developer do to make this component available?

Choose 2 answers







...
"A developer is migrating a Visualforce page into a Lightning web component.
The Visualforce page shows information about a single record. The developer decides to use Lightning Data Service to access record data.

Which security consideration should the developer be aware of?




...
"A developer created a trigger on the Account object and wants to test if the trigger is properly bulkified. The developer team decided that the trigger should be tested with 200 account records with unique names.

What two things should be done to create the test data within the unit test with the least amount of code?

Choose 2 answers







...
Consider the following code snippet:

public static List<Lead> obtainAllFields(Set.<Id> leadIds){
List<Lead> result = new List<Lead>();
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 and ensure successful execution of the method?




...
A business has a proprietary Order Management System (OMS) that creates orders from their website and fulfills the orders.
When the order is created In the OMS, an Integration also creates an order record in Salesforce and relates It to the contact as identified by the email on the order. As the order goes through different stages In the OMS, the integration also updates it in Salesforce.
It Is noticed that each update from the OMS creates a new order record in Salesforce.

Which two actions will prevent the duplicate order records from being created In Salesforce?

Choose 2 answers







...
"A developer wrote Apex code that calls out to an external system. How should a developer write the test to provide test coverage?




...
"Universal Containers has a support process that allows users to request support from its engineering team using a custom object, Engineering_ Support__c.

Users should be able to associate multiple Engineering_Support__c records to a single Opportunity record. Additionally, aggregate information about the Engineering_ Support__c records should be shown on the Opportunity record.

What should a developer implement to support these requirements?




...
Refer to the following code snippet for an environment that has more than 200 Accounts belonging to the ‘Technology’ industry:

for(Account thisAccount : [SELECT Id, Industry FROM Account LIMIT 250]){
if(thisAccount.Industry == 'Technology'){
thisAccount.Is_Tech__c = true;
}
update thisAccount;
}

When the code executes, what happens as a result of the Apex transaction?




...
A developer created these three Rollup Summary fields In the custom object, Project__c:
● Total_Timesheets__c
● Total_Approved_Timesheets__c
● Total_Rejected_Timesheets__c
The developer Is asked to create a new field that shows the ratio between rejected and approved timesheets for a given project.

Which should the developer use to Implement the business requirement In order to minimize maintenance overhead?




...
"A third-party vendor created an unmanaged Lightning web component. The Salesforce Administrator wishes to expose the component only on Record Page Layouts.

Which two actions should the developer take to accomplish this business objective?

Choose 2 answers







...
"What are two best practices when it comes to Lightning Web Component events?

Choose 2 answers







...
"A developer is creating a Lightning web component to show a list of sales records.
The Sales Representative user should be able to see the commission field on each record. The Sales Assistant user should be able to see all fields on the record except the commission field.

How should this be enforced so that the component works for both users without showing any errors?




...
An org has an existing flow that creates an Opportunity with an Update Records element. A developer must update the flow to also create a Contact and store the created Contact's ID on the Opportunity.

Which update must the developer make in the flow?




...
A developer must troubleshoot to pinpoint the causes of performance issues when a custom page loads in their org.

Which tool should the developer use to troubleshoot?




...
"A developer needs to create a baseline set of data (Accounts, Contacts, Products, Assets) for an entire suite of tests allowing them to test independent requirements for various types of Salesforce Cases.

Which approach can efficiently generate the required data for each unit test?




...
"An org has two custom objects:
- Plan__c, that has a master-detail relationship to the Account object
- Plan_Item__c, that has a master-detail relationship to the Plan__c object

What should a developer use to create a Visualforce section on the Account page layout that displays all of the Plan__c records related to the Account and all of the Plan_Item__c records related to those Plan__c records?




...
"In the following example, which sharing context will myMethod execute when it is invoked?

public Class myClass {
public void myMethod() { /* implementation */ }
}




...
"What are two ways for a developer to execute tests in an org?

Choose 2 answers







...
"Universal Containers has a Visualforce page that displays a table of every Container__c being rented by a given Account.
Recently this page is failing with a view state limit because some of the customers rent over 10,000 containers.

What should a developer change about the Visualforce page to help with the page load errors?




...
A custom picklist field, Food_Preference_c, exists on a custom object. The picklist contains the following options: 'Vegan', 'Kosher', 'Non... Preference'. The developer must ensure a value is populated every time a record is created or updated.

What is the optimal way to ensure a value is selected every time a record is saved?




...
"A developer is building custom search functionality that uses SOSL to search account and contact records that match search terms provided by the end user. The feature is exposed through a Lightning web component, and the end user is able to provide a list of terms to search.

Consider the following code snippet:

@AuraEnabled
public static List<List<sObject>> searchTerms(List<String> termList) {
List<List<sObject>> result = new List<List<sObject>> ();
for (String term : termList){
result.addAll( [FIND :term IN ALL FIELDS RETURNING Account(Name), Contact(FirstName, LastName) ])
}
return result;
}

What is the maximum number of search terms the end user can provide to successfully execute the search without exceeding a governor limit?




...
"AW Computing (AWC) handles orders in Salesforce and stores its product inventory in a field, Inventory__c, on a custom object, Product__c. When an order for a Product__c is placed, the Inventory__c field is reduced by the quantity of the order using an Apex trigger.

public void reduceInventory (Id prodId, Integer qty){
Integer newInventoryAmt = getNewInventoryAmt (prodId, qty);
Product__c = new Product__c(Id = prodId, Inventory__c = newInventoryAmt);
Update p;
// code goes here
}

AWC wants the real-time inventory reduction for a product to be sent to many of its external systems, including some future systems the company is currently planning.

What should a developer add to the code at the placeholder to meet these requirements?




...
The sales management team at Universal Containers requires that the Lead Source field of the Lead record be populated when a Lead Is converted.

What should be done to ensure that a user populates the Lead Source field prior to converting a Lead?




...
"A developer is debugging the following code to determine why Accounts are not being created,

List<Account> accts = getAccounts(); // getAccounts implemented elsewhere
Database.insert(accts, false);

How should the code be altered to help debug the issue?




...
Which three Salesforce resources can be accessed from a Lightning web component?

Choose 3 answers








...
"Universal Containers has implemented an order management application. Each Order can have one or more Order Line items.
The Order Line object is related to the Order via a master-detail relationship. For each Order Line item, the total price is calculated by multiplying the Order Line item price with the quantity ordered.

What is the best practice to get the sum of all Order Line item totals on the Order record?




...
What is the result of the following code?

Account a = new Account();
Database.insert(a, false);




...
"A developer has a single custom controller class that works with a Visualforce Wizard to support creating and editing multiple Objects. The wizard accepts data from user inputs across multiple Visualforce pages and from a parameter on the initial URL.

Which three statements are useful inside the unit test to effectively test the custom controller?

Choose 3 answers








...
"A developer has the following requirements:
● Calculate the total amount on an Order.
● Calculate the line amount for each Line Item based on quantity selected and price.
● Move Line Items to a different Order if a Line Item is not in stock.

Which relationship implementation supports these requirements on its own?




...
A developer has a requirement to write Apex code to update a large number of account records on a nightly basis. The system administrator needs to be able to schedule the class to run after business hours on an as-needed basis.

Which class definition should be used to successfully implement this requirement?




...
"A software company uses the following objects and relationships:
● Case: to handle customer support issues
● Defect__c: a custom object to represent known issues with the company's software
● Case_Defect__c: a junction object between Case and Defect to represent that a defect is a cause of a customer issue
Case and Defect__c have Private organization-wide defaults.

What should be done to share a specific Case_Defect__c record with a user?




...
"A developer wants to send an outbound message when a record meets a specific criteria.

Which two features satisfy this use case?

Choose 2 answers







...
"Which annotation exposes an Apex class as a RESTful web service?




...
"A developer is asked to create a Visualforce page that lists the contacts owned by the current user. This component will be embedded in a Lightning page.

Without writing unnecessary code, which controller should be used for this purpose?




...
"Universal Containers uses Service Cloud with a custom field, Stage__c, on the Case object.
Management wants to send a follow-up email reminder 6 hours after the Stage e field is set to ""Waiting on Customer"". The Salesforce Administrator wants to ensure the solution used is bulk safe.

Which automation tool should a developer recommend to meet these business requirements?

Choose 2 answers







...
"When a user edits the Postal Code on an Account, a custom Account text field named ""Timezone"" must be updated based on another custom object called PostalCodeToTimezone__c.

What is the optimal way to implement this feature?




...
What can be used to override the Account's standard Edit button for Lightning Experience?




...
"What are two use cases for executing Anonymous Apex code?

Choose 2 answers







...
"Which two sfdx commands can be used to add testing data to a Developer sandbox?

Choose 2 answers







...
Which three statements are true regarding custom exceptions in Apex?

Choose 3 answers








...
"A developer is debugging the following code to determine why Accounts are not being created,

Account a = new Account (Name = 'A');
Database.insert(a, false);

How should the code be altered to help debug the issue?




...
A developer needs to have records with specific field values in order to test a new Apex class.

What should the developer do to ensure the data is available to the test?




...
The Account object in an organization has a master-detail relationship to a child object called Branch. The following automations exist:
- Rollup summary fields
- Custom validation rules
- Duplicate rules
A developer created a trigger on the Account object.

Which two things should the developer consider while testing the trigger code?

Choose 2 answers







...
"Which two statements are true about using the @testSetup annotation In an Apex test class?

Choose 2 answers







...
Refer to the following Apex code:

Integer x = 0;
do {
x = 1;
x++;
} while (x<1);
System.debug(x);

What is the value of x when it is written to the debug log?




...
"In terms of the MVC paradigm, what are two advantages of implementing the view layer of a Salesforce application using Lightning Web Component-based development over Visualforce?

Choose 2 answers







...
"Which two settings must be defined in order to update a record of a junction object?

Choose 2 answers







...
"Universal Containers uses Service Cloud with a custom field, Stage__c, on the Case object.

Management wants to send a follow-up email reminder 6 hours after the Stage__c field is set to ""Waiting on Customer"". The Salesforce Administrator wants to ensure the solution used is bulk safe.

Which two automation tools should a developer recommend to meet these business requirements?

Choose 2 answers







...
"The OrderHelper class is a utility class that contains business logic for processing orders.
Consider the following code snippet:

public class without sharing OrderHelper{
//code implementation
}

A developer needs to create a constant named DELIVERY_MULTIPLIER with a value of 4.15. The value of the constant should not change at any time in the code.

How should the developer declare the DELIVERY_MULTIPLIER constant to meet the business objectives?




...
Universal Containers recently transitioned from Classic to Lightning Experience.

One of its business processes requires certain values from the Opportunity object to be sent via an HTTP REST callout to its external order management system based on an ad-hoc basis when the user presses a custom button on the Opportunity detail page. Example values are as follows:
- Name
- Amount
- Account

Which two methods should the developer implement to fulfill the business requirement?

Choose 2 answers







...
"A developer has a Visualforce page and custom controller to save Account records. The developer wants to display any validation rule violations to the user.

How can the developer make sure that the validation rule violations are displayed?




...
Cloud Kicks has a multi-screen flow that its call center agents use when handling inbound service desk calls.

At one of the steps in the flow, the agents should be presented with a list of order numbers and dates that are retrieved from an external order management system in real time and displayed on the screen.

What should a developer use to satisfy this requirement?




...
A developer Is asked to prevent anyone other than a user with Sales Manager profile from changing the Opportunity Status to Closed Lost If the lost reason Is blank.

Which automation allows the developer to satisfy this requirement In the most efficient manner?




...
What should a developer do to check the code coverage of a class after running all tests?




...
"A developer created this Apex trigger that calls MyClass.myStaticMethod:

trigger myTrigger on Contact (before insert)
{ MyClass.myStaticMethod(trigger.new); }

The developer creates a test class with a test method that calls MyClass.myStaticMethod directly, resulting in 81% overall code coverage.

What happens when the developer tries to deploy the trigger and two classes to production, assuming no other code exists?




...
"Management asked for opportunities to be automatically created for accounts with annual revenue greater than $1,000,000. A developer created the following trigger on the Account object to satisfy this requirement.

for (Account a: Trigger.new) {
if (a.AnnualRevenue > 1000000) {
List<Opportunity> oppList = [SELECT Id FROM Opportunity WHERE accountId = :a. Id];
if (oppList.size() == 0) {
Opportunity oppty = new Opportunity (Name = a.name, StageName = ‘Prospecting’, CloseDate = system.today().addDays(30) );
insert oppty;
}
}
}

Users are able to update the account records via the UI and can see an opportunity created for high annual revenue accounts. However, when the administrator tries to upload a list of 179 accounts using Data Loader, it fails with System.Exception errors.

Which two actions should the developer take to fix the code segment shown above?

Choose 2 answers







...
"A developer migrated functionality from JavaScript Remoting to a Lightning web component and wants to use the existing getOpportuninites() method to provide data.

Which modification is necessary?




...
"AW Computing tracks order information in custom objects called Order__c and Order_Line__c. Currently, all shipping information is stored in the Order__c object.

The company wants to expand its order application to support split shipments so that any number of Order_Line__c records on a single Order__c can be shipped to different locations.

What should a developer add to fulfill this requirement?




...
A developer is creating a page that allows users to create multiple Opportunities. The developer is asked to verify the current user's default Opportunity record type, and set certain default values based on the record type before inserting the record.

How can the developer find the current user's default record type?




Комментарии

Правильные ответы