Pass the Salesforce Developers PDI Questions and answers with CertsForce

Viewing page 6 out of 7 pages
Viewing questions 51-60 out of questions
Questions # 51:

While working in a sandbox, an Apex test fails when run in the Test Runner. However, executing the Apex logic in the Execute Anonymous window succeeds with no exceptions or errors.

Why did the method fail in the sandbox test framework but succeed in the Developer Console?

Options:

A.

The test method does not use system. runAs to execute as a specific user.


B.

The test method is calling an @future method.


C.

The test method relies on existing data in the sandbox.


D.

The test method has a syntax error in the code.


Expert Solution
Questions # 52:

If Apex code executes inside the execute() method of an Apex class when implementing the Batchable interface, which two statements are true regarding governor limits?

Choose 2 answers

Options:

A.

The Apex governor limits are reset for each iteration of the execute () method.


B.

The Apex governor limits cannot be exceeded due to the asynchronaus nature of the transaction.


C.

The Apex governor limits will use the asynchronous limit levels.


D.

The Apex governor limits are omitted while calling the constructor of the Apex class.


Expert Solution
Questions # 53:

What are two characteristics related to formulas?

Choose 2 answers

Options:

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.


Expert Solution
Questions # 54:

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?

Options:

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 ... */ }

}


Expert Solution
Questions # 55:

What is an example of a polymorphic lookup field in Salesforce?

Options:

A.

The Parentid field on the standard Account object


B.

A custom field, Link__c, on the standard Contact object that looks up to an Account or a Campaign


C.

The Whatld field on the standard Event object


D.

The LeadId and Contactid fields on the standard Campaign Member object


Expert Solution
Questions # 56:

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

Options:

A.

Add lightning_Recordpage to the statuscomponent. js file,


B.

Add lightning RecordPage to the statusComp .js-meta.xml file.


C.

Set is Exposes to true In the statuscomponent.js-meta.xml file.


D.

Add Account to the statusComponent. js-meta.xm1 file.


Expert Solution
Questions # 57:

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

Options:

A.

View the Apex Status page


B.

View the Apex Jobs page


C.

Query the AsyncApexJob object


D.

View the Apex Flex Queue


Expert Solution
Questions # 58:

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?

Options:

A.

Implement pagination with an OffsetController.


B.

Implement pagination with a StandardSetController.


C.

Use JavaScript remoting with SOQL Offset.


D.

Use lazy loading and a transient List variable.


Expert Solution
Questions # 59:

A developer must write an Apex method that will be called from a Lightning component. The method may delete an Account stored in the accountRec variable.

Which method should a developer use to ensure only users that should be able to delete Accounts can successfully perform deletions?

Options:

A.

accountRec, isDeletable()


B.

Schema,sObjectType,Account, isDeletable ()


C.

accuntRec, sObjectType,isDeletable()


D.

Account,isDeleteable


Expert Solution
Questions # 60:

What are three considerations when using the @lnvocableMethod annotation in Apex?

Choose 3 answers

Options:

A.

Only one method using the @invecableMethod annotation can be defined per Apex class_


B.

A method using the @invecableMethod annotation can have multiple input parameters.


C.

A method using the @invocablemethod annotation must be declaredas static,


D.

GO A method using the @invocablemethod annotation must define a return value.


E.

A method using the @invocableMethod annotation can be declared as Public or Global.


Expert Solution
Viewing page 6 out of 7 pages
Viewing questions 51-60 out of questions