Summer Sale Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: v4s65

PDI Exam Dumps - Salesforce Certified Platform Developer 1 (SP25)

Go to page:
Question # 25

A developer needs to prevent the creation of Request__c records when certain conditions exist in the system. A RequestLogic class exists that checks the conditions.

What is the correct implementation?

A.

apex

CopyEdit

trigger RequestTrigger on Request__c (before insert) {

RequestLogic.validateRecords(Trigger.new);

}

B.

apex

CopyEdit

trigger RequestTrigger on Request__c (before insert) {

RequestLogic.validateRecords(trigger.new);

}

C.

apex

CopyEdit

trigger RequestTrigger on Request__c (before insert) {

if (RequestLogic.isValid(Request__c)) {

Request.addError('Your request cannot be created at this time.');

}

}

D.

apex

CopyEdit

trigger RequestTrigger on Request__c (after insert) {

if (RequestLogic.isValid(Request__c)) {

Request.addError('Your request cannot be created at this time.');

}

}

Full Access
Question # 26

While developing an Apex class with custom search functionality that will be launched from a Lightning Web Component, how can the developer ensure only records accessible to the currently logged in user are displayed?

A.

Use the WITH SECURITY_ENFORCED clause within the SOQL.

B.

Use the inherited sharing keyword.

C.

Use the with sharing keyword.

D.

Use the without sharing keyword.

Full Access
Question # 27

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

Choose 2 answers

A.

Records created in the test setup method cannot be updated in individual test methods.

B.

In a test setup method, test data is inserted once and made available for all test methods In the test class.

C.

A method defined with the @testSetup annotation executes once for each test method in the test class and counts towards system limits.

D.

The @testSetup annotation is not supported when the @isTest(SeeAllData=True) annotation is used .

Full Access
Question # 28

Which annotation should a developer use on an Apex method to make it available to be wired to a property in a Lightning web component?

A.

@AuraEnabled(cacneable=true)

B.

@RemoteAction (cacheable-true)

C.

@RemoteAction

D.

@AuraEnabled

Full Access
Question # 29

Universal Containers has a large number of custom applications that were built using a third-party JavaScript framework and exposed using Visualforce pages. The company wants to update these applications to apply styling that resembles the look and feel of Lightning Experience.

What should the developer do to fulfill the business request in the quickest and most effective manner?

A.

Rewrite all Visualforce pages as Lightning components.

B.

Set the attribute enableLightning to true in the definition.

C.

Enable Available for Lightning Experience, Lightning Communities, and the mobile app on Visualforce pages used by the custom application.

D.

Incorporate the Salesforce Lightning Design System CSS stylesheet Into the JavaScript applications.

Full Access
Question # 30

What are two characteristics related to formulas?

Choose 2 answers

A.

Formulas are calculated at runtime and are not stored in the database.

B.

Formulas can reference themselves.

C.

Formulas can reference values in related objects.

D.

Fields that are used in a formula field can be deleted or edited without editing the formula.

Full Access
Question # 31

A Next Best Action strategy uses an Enhance Element that invokes an Apex method to determine a discount level for a Contact, based on a number of factors.

What is the correct definition of the Apex method?

A.

apex

Copy

@InvocableMethod

global static List> getLevel(List input)

{ /*implementation*/ }

B.

apex

Copy

@InvocableMethod

global Recommendation getLevel(ContactWrapper input)

{ /*implementation*/ }

C.

apex

Copy

@InvocableMethod

global List> getLevel(List input)

{ /*implementation*/ }

D.

apex

Copy

@InvocableMethod

global static List getLevel(List input)

{ /*implementation*/ }

Full Access
Question # 32

A developer needs to implement a custom SOAP Web Service that is used by an external Web Application. The developer chooses to include helper methods that are not used by the Web Application in the implementation of the Web Service Class.

Which code segment shows the correct declaration of the class and methods?

A.

apex

Copy

webservice class WebServiceClass {

private Boolean helperMethod() { /* implementation ... */ }

global static String updateRecords() { /* implementation ... */ }

}

B.

apex

Copy

global class WebServiceClass {

private Boolean helperMethod() { /* implementation ... */ }

webservice static String updateRecords() { /* implementation ... */ }

}

C.

apex

Copy

webservice class WebServiceClass {

private Boolean helperMethod() { /* implementation ... */ }

webservice static String updateRecords() { /* implementation ... */ }

}

D.

apex

Copy

global class WebServiceClass {

private Boolean helperMethod() { /* implementation ... */ }

global String updateRecords() { /* implementation ... */ }

}

Full Access
Go to page: