Pass the Salesforce Developers CRT-450 Questions and answers with CertsForce

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

How is a controller and extension specified for a custom object named "Notice" on a Visualforce page?

Options:

A.

apex:page standardController="Notice_c" extensions="myControllerExtension"”


B.

apex:page controllers="Notice_c, myContcollerExtension"


C.

apex:pege=Notice extends="myControllerExtension”


D.

apex:page controller="Notice_c" extensions="myControllerExtension"


Expert Solution
Questions # 52:

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?

Options:

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


Expert Solution
Questions # 53:

The following Apex method is part of the ContactService class that is called from a trigger:

Question # 53

How should the developer modify the code to ensure best practices are met?

A)

Question # 53

B)

Question # 53

C)

Question # 53

D)

Options:

A.

Option A


B.

Option B


C.

Option C


D.

Option D


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:

Universal Containers (UC) uses out-of-the-box order management, that has a Master-Detail relationship between Order and Order Line Item.

UC stores the availability date on each Order Line Item and Orders are only shipped when all of the Order Line Items are available.

Which method should be used to calculate the estimated ship date for an Order?

Options:

A.

Use 2 LATEST formula on each of the latest availability date fields.


B.

Use a CEILING formula on each of the latest availability date fields.


C.

Use @ DAYS formula on each of the availability date fields and a COUNT Roll-Up Summary field on the Order.


D.

Use a MAX Roll-Up Summary field on the latest availability date fields.


Expert Solution
Questions # 56:

Developers at Universal Containers (UC) use version control to share their code changes, but they notice that when they deploy their code to different environments they often have failures. They decide to set up Continuous Integration (CI).

What should the UC development team use to automatically run tests as part of their CI process?

Options:

A.

Salesforce CLI


B.

Visual Studio Code


C.

Force.com Toolkit


D.

Developer Console


Expert Solution
Questions # 57:

Universal Containers needs to create a custom user interface component that allows users to enter information about their accounts.

The component should be able to validate the user input before saving the information to the database.

What is the best technology to create this component?

Options:

A.

Flow


B.

Lightning Web Components


C.

Visualforce


D.

VUE JavaScript framework


Expert Solution
Questions # 58:

The Job_Application__c custom object has a field that is a master-detail relationship to the Contact object, where the Contact object is the master.

As part of a feature implementation, a developer needs to retrieve a list containing all Contact records where the related Account Industry is 'Technology', while also retrieving the Contact's Job_Application__c records.

Based on the object's relationships, what is the most efficient statement to retrieve the list of Contacts?

Options:

A.

[SELECT Id, (SELECT Id FROM Job_Applications__r) FROM Contact WHERE Accounts.Industry = 'Technology']


B.

[SELECT Id, (SELECT Id FROM Job_Application__c) FROM Contact WHERE Accounts.Industry = 'Technology']


C.

[SELECT Id, (SELECT Id FROM Job_Application__c) FROM Contact WHERE Account.Industry = 'Technology']


D.

[SELECT Id, (SELECT Id FROM Job_Applications__r) FROM Contact WHERE Account.Industry = 'Technology']


Expert Solution
Questions # 59:

Question # 59

When the code executes, a DML exception is thrown.

How should a developer modify the code to ensure exceptions are handled gracefully?

Options:

A.

Implement the upset DML statement.


B.

Implement Change Data Capture.


C.

Implement a try/catch block for the DML.


D.

Remove null items from the list of Accounts.


Expert Solution
Questions # 60:

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
Viewing page 6 out of 7 pages
Viewing questions 51-60 out of questions