Salesforce CRT-450 Prepare for your Platform Developer I Certification Exam Practice Test

Page: 1 / 14
Total 174 questions
Question 1

A developer created a trigger on the Account object. While testing the trigger, the developer sees the error message 'Maximum trigger depth exceeded'.

What could be the possible causes?



Answer : C

The error message 'Maximum trigger depth exceeded' occurs when a trigger invokes itself recursively more than the allowed limit.

Option C: The trigger is getting executed multiple times.

Correct Answer.

This error indicates that the trigger is recursively calling itself.

This can happen if the trigger performs an update or insert operation that causes the same trigger to fire again, leading to an infinite loop.

Salesforce enforces a limit on the recursion depth to prevent stack overflows.

User permissions do not cause the 'Maximum trigger depth exceeded' error.

Option B: The trigger is too long and should be refactored into a helper class.

*Incorrect, but possible code improvement.

While refactoring code into helper classes is a good practice, it does not directly address the recursion issue causing the error.

Option D: The trigger does not have sufficient code coverage.

Incorrect.

Code coverage issues affect deployment but do not cause runtime errors like 'Maximum trigger depth exceeded'.

Conclusion:

The error is caused because the trigger is getting executed multiple times due to recursion, leading to exceeding the maximum trigger depth.


Triggers and Order of Execution

Preventing Recursive Triggers

Incorrect Options:

Option A: The developer does not have the correct user permission.

Incorrect.

Question 2

How can a developer check the test coverage of autolaunched Flows before deploying them in a change set?



Answer : A

As of Winter '20 (API version 47.0), Salesforce introduced the ability to test Autolaunched Flows with test coverage.

However, as of the current knowledge cutoff (2023-09), there is no direct way within the Salesforce UI to check the test coverage of autolaunched flows before deploying them via change sets.

To check the test coverage of flows, developers can use the Tooling API to query for test coverage.

Option A: Use SOQL and the Tooling API.

Correct Answer.

Developers can use the Tooling API to query for Flow test coverage information.

By executing a SOQL query on FlowTestCoverage and FlowVersionView objects via the Tooling API, developers can retrieve coverage data.

This allows checking flow test coverage programmatically before deployment.

The Flow Properties page does not provide test coverage information.

It allows configuring flow settings but not checking test coverage.

Option C: Use the Code Coverage Setup page.

Incorrect.

The Code Coverage page in Setup pertains to Apex code coverage, not Flow coverage.

Option D: Use the ApexTestResult class.

Incorrect.

The ApexTestResult class is used for Apex test results.

It does not provide information on Flow test coverage.

Conclusion:

To check the test coverage of autolaunched Flows before deploying them in a change set, a developer should use SOQL and the Tooling API, which is Option A.


Flow Test Coverage with Tooling API

Use Tooling API to Check Flow Coverage

Incorrect Options:

Option B: Use the Flow Properties page.

Incorrect.

Question 3

A developer is tasked with building a custom Lightning web component to collect Contact information.

The form will be shared among many different types of users in the org. There are security requirements that only certain fields should be edited and viewed by certain groups of users.

What should the developer use in their Lightning Web Component to support the security requirements?



Answer : B

To support field-level security and sharing in a Lightning Web Component (LWC) form that collects Contact information, and to ensure that only certain fields are editable and viewable by specific user groups, the developer should use the appropriate base components that respect these security settings.

Option B: lightning-input-field

Correct Choice.

The lightning-input-field component is used within lightning-record-edit-form or lightning-record-view-form.

It automatically enforces field-level security and sharing rules.

It ensures that users only see and edit fields they have access to, based on their profile and permission sets.

force-input-field is not a valid Lightning Web Component.

It was used in Aura components but is not applicable in LWC.

Option C: ui-input-field

Incorrect.

ui-input-field is not a valid component in LWC.

The ui namespace components are deprecated and were part of Aura components.

Option D: aura-input-field

Incorrect.

There is no component named aura-input-field.

Aura components use different base components, but this is not applicable to LWC.

Conclusion:

To meet the security requirements and support field-level security in the LWC form, the developer should use lightning-input-field within a lightning-record-edit-form.


lightning-input-field Documentation

Enforce Field-Level Security

Incorrect Options:

Option A: force-input-field

Incorrect.

Question 4

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?

A)

B)

C)

D)



Answer : D


Question 5

What are three characteristics of change set deployments?

Choose 3 answers



Answer : C, D, E

Change Sets are a point-and-click tool for migrating metadata between related Salesforce orgs, such as from a sandbox to a production org.

Option C: Deployment is done in a one-way, single transaction.

Correct.

Change sets are deployed in a one-way direction from the source org to the destination org.

The deployment occurs in a single transaction. If any component fails to deploy, the entire deployment is rolled back.

Before deploying a change set, you must set up a deployment connection between the source and destination orgs.

This connection is established through the Setup menu under Deployment Connections.

Change sets can only be sent between orgs that are affiliated, such as a sandbox and its production org, or sandboxes that are clones of the same production org.

They cannot be used between unrelated orgs.

Change sets can deploy the metadata of custom settings (the definition), but not the actual data stored within them.

To move custom settings data, you must use a data migration tool like Data Loader.

Change sets are designed to transfer metadata components, not data records.

To transfer data records, use tools like Data Loader or Data Import Wizard.


Deploy Change Sets

Option D: Sending a change set between two orgs requires a deployment connection.

Correct.

Create Deployment Connections

Option E: Change sets can only be used between related organizations.

Correct.

Change Sets Overview

Incorrect Options:

Option A: Change sets can deploy custom settings data.

Incorrect.

Change Set Considerations

Option B: Change sets can be used to transfer records.

Incorrect.

Deploy Metadata with Change Sets

Conclusion:

The three characteristics of change set deployments are C, D, and E.

Question 6

Which statement generates a list of Leads and Contacts that have a field with the phrase 'ACME'?

A)

B)

C)

D)



Answer : B


Question 7

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

Choose 3 answers



Answer : B, D, E

Lightning Web Components (LWC) can access various Salesforce resources.

Option B: SVG resources

Accessible.

LWCs can include SVG files to define custom icons for the component.

The SVG file is placed in the component bundle with the name componentName.svg.

LWCs can access content asset files using the @salesforce/contentAssetUrl import.

This allows components to reference content assets stored in Salesforce.

Example:

import myContentAsset from '@salesforce/contentAssetUrl/My_Asset';

LWCs can access static resources using the @salesforce/resourceUrl import.

Static resources can include JavaScript libraries, images, stylesheets, etc.

Example:

import myResource from '@salesforce/resourceUrl/My_Resource';

LWCs can use external JavaScript libraries, but there are restrictions.

The library must be included as a static resource and must be compatible with Locker Service.

Not all external libraries can be used due to security restrictions.

LWCs cannot import or use third-party web components due to Locker Service and namespace restrictions.

Components must be within the same namespace to be used.

Conclusion:

The three Salesforce resources that can be accessed from a Lightning web component are:

Option B: SVG resources

Option D: Content asset files

Option E: Static resources


Adding an SVG Resource to a Component

Option D: Content asset files

Accessible.

Import Content Assets

Option E: Static resources

Accessible.

Import Static Resources

Options Not Applicable:

Option A: All external libraries

Not All Accessible.

Third-Party Libraries

Option C: Third-party web components

Not Accessible.

Page:    1 / 14   
Total 174 questions