Month End Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: simple70

Pass the Salesforce Developers PDII Questions and answers with CertsForce

Viewing page 2 out of 5 pages
Viewing questions 11-20 out of questions
Questions # 11:

Consider the following code snippet:

HTML

<template for:each={orders.data} for:item="order">

</template>

How should the component communicate to the component that an order has been selected by the user?

Options:

A.

Create and dispatch a custom event.


B.

Create and fire a component event.


C.

Create and fire an application event.


D.

Create and fire a standard DOM event.


Expert Solution
Questions # 12:

Consider the following code snippet:

Java

01 public with sharing class AccountsController{

03 @AuraEnabled

04 public List getAllAccounts(){

05 return [Select Id, Name, Industry FROM Account];

06 }

08 }

As part of the deployment cycle, a developer creates the following test class:

Java

@isTest

private class AccountsController_Test{

@TestSetup

private static void makeData(){

User user1 = [Select Id FROM User WHERE Profile.Name = 'System Administrator' ... LIMIT 1];

User user2 = [Select Id FROM User WHERE Profile.Name = 'Standard User' ... LIMIT 1];

TestUtils.insertAccounts(10,user1.Id);

TestUtils.insertAccounts(20,user2.Id);

}

@isTest

private static void testGetAllAccounts(){

// Query the Standard User into memory

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:

A.

Add @IsTest(seeAllData=true) to line 12 and enclose lines 15 and 16 within Test.startTest() and Test.stopTest().


B.

Add System.runAs(User) to line 14 and enclose line 15 within Test.startTest() and Test.stopTest().


C.

Query the Standard User into memory and enclose lines 15 and 16 within the System.runAs(user) method.


D.

Query the Administrator user into memory and enclose lines 15 and 16 within the System.runAs(user) method.


Expert Solution
Questions # 13:

Universal Containers is using a custom Salesforce application to manage customer support cases. The support team needs to collaborate with external partners to resolve certain cases. However, they want to control the visibility and access to the cases shared with the external partners. Which Salesforce feature can help achieve this requirement?

Options:

A.

Apex managed sharing23


B.

Sharing sets24


C.

Role hierarchy25


D.

Criteria-based sharing rules26


Expert Solution
Questions # 14:

A developer is creating a Lightning web component to display a calendar. The component will be used in multiple countries. In some locales, the first day of the week is a Monday, or a Saturday, or a Sunday. What should the developer do to ensure the calendar displays accurately for users in every locale?

Options:

A.

Query the FirstDayOfWeek field from the Locale for the current user.


B.

Use a custom metadata type to store key/value pairs.


C.

Use UserInfo.getLocale() in the component.


D.

Import the @salesforce/i18n module and use the firstDayOfWeek internationalization property.


Expert Solution
Questions # 15:

A company accepts orders for customers in their ERP system that must be integrated into Salesforce as Order__c records with a lookup field to Account. The Account object has an external ID field, ERP_Customer_ID__c. What should the integration use to create new Order__c records that will automatically be related to the correct Account?1234

Options:

A.

Upsert on the Order__c object and specify the ERP_Customer_ID__c for the Account relationship.5678


B.

Upsert on the Account and specify the ERP_Customer_ID__c for the relations9hip.101112


C.

Merge on the Order__c object and spe13cify the ERP_Customer_ID__c for 14the 15Account relationship.


D.

Insert on the Order__c object followed by an update on the Order__c object.


Expert Solution
Questions # 16:

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

Options:

A.

The administrators are deploying their own Change Sets, thus deleting each other's fields from the objects in production.3839


B.

The admin40istrators are deploying their own Change Sets over each othe41r, thus replacing entire Page Layouts in production.


C.

Page Layouts should never be deployed via Change Sets, as this causes Field-Level Security to be reset and fields to disappear.42


D.

A sandbox should be created to use as a unified testing environment instead of deploying Change Sets directly to produ43ction.


Expert Solution
Questions # 17:

A developer has a test class that creates test data before making a mock callout but now receives a "You have uncommitted work pending. Please commit or rollback before calling out" error. Which step should be taken to resolve the error?

Options:

A.

Ensure both the insertion and mock callout occur after the Test.stopTest().1


B.

Ensure the records are inserted before the Test.startTest() statement and the mock callout occurs within a method annotated with @testSetup.2


C.

Ensure the records are inserted befo3re the Test.startTest() statement and the mock callout occurs after the Test.startTest().45


D.

Ensure both the insertion and mock callout occur after the Test.startTest().67


Expert Solution
Questions # 18:

A company wants to allow support managers to see all cases in the org, regardless of who owns them. However, they want to support agents to only see cases they own or cases owned by someone in their role or a subordinate role. Which sharing solution should a developer use to achieve this requirement?

Options:

A.

Sharing sets


B.

Apex managed sharing


C.

Role hierarchy


D.

Criteria-based sharing rules


Expert Solution
Questions # 19:

Which use case can be performed only by using asynchronous Apex?

Options:

A.

Querying tens of thousands of records


B.

Making a call to schedule a batch process to complete in the future


C.

Calling a web service from an Apex trigger


D.

Updating a record after the completion of an insert1


Expert Solution
Questions # 20:

A software company uses a custom object, Defect__c, to track defects in their software. Defect__c has organization-wide defaults set to private. Each Defect__c has a related list of Reviewer__c records, each with a lookup field to User that is used to indicate that the User will review the Defect__c. What should be used to give the User on the Reviewer__c record read only access to the Defect__c record on the Reviewer__c record?34

Options:

A.

View All on Defect__c


B.

Criteria-based sharing56


C.

Lightning web component78


D.

Apex managed sharing910


Expert Solution
Viewing page 2 out of 5 pages
Viewing questions 11-20 out of questions