How can a developer check the test coverage of autolaunched Flows before deploying them in a change set?
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.
team of developers is working on a source-driven project that allows them to work independently, with many different org configurations.
Which type of Salesforce orgs should they use for their development?
Scratch Orgs are disposable Salesforce orgs that can be created quickly and configured with different features and settings. They are ideal for source-driven development and allow developers to work independently.
Option D: Scratch orgs
Correct Answer.
Scratch orgs support source-driven development and can be fully configured through scripts and the Salesforce CLI.
Developers can create and destroy scratch orgs as needed, ensuring they have isolated environments.
Options Not Applicable:
Option A: Full Copy sandboxes
Better suited for staging and performance testing, not for individual developer environments.
Option B and C: Developer orgs and Developer sandboxes
Less flexible for source-driven development.
Developer sandboxes are not as easily reconfigurable as scratch orgs.
Conclusion:
For source-driven development with independent configurations, the team should use Scratch orgs, which is Option D.
A developer created these three Rollup Summary fields in the custom object, project_ c:
The developer is asked to create a new field that shows the ratio between rejected and approved timesheets for a given project.
Which should the developer use to implement the business requirement in order to minimize maintenance overhead?
A developer created a child Lightning web component nested inside a parent Lightning web component. The parent component needs to pass a string value to the child component.
In which two ways can this be accomplished?
Choose 2 answers
In Lightning Web Components (LWC), communication between parent and child components can be achieved in several ways.
Option A: The parent component can use a public property to pass the data to the child component.
Correct Method.
The child component can declare a public property using the @api decorator.
The parent component can then pass data to the child component via this property in the template.
Example:
Child Component (childComponent.js):
import { LightningElement, api } from 'lwc';
export default class ChildComponent extends LightningElement {
@api
myProperty;
}
Parent Component Template (parentComponent.html):
<template>
<c-child-component my-property={parentValue}></c-child-component>
</template>
The child component can expose a public method using the @api decorator.
The parent can call this method using a DOM query selector.
Example:
Child Component (childComponent.js):
import { LightningElement, api } from 'lwc';
export default class ChildComponent extends LightningElement {
@api
myMethod(value) {
// handle the value
}
}
Parent Component (parentComponent.js):
import { LightningElement } from 'lwc';
export default class ParentComponent extends LightningElement {
handleButtonClick() {
const childComponent = this.template.querySelector('c-child-component');
childComponent.myMethod('some value');
}
}
Custom events in LWC are used for child-to-parent communication.
The child component can dispatch events to communicate with the parent.
Events do not flow from parent to child in LWC.
Using an Apex controller to pass data between parent and child components is unnecessary and inefficient.
Apex controllers are used for server-side data operations, not component communication.
Passing Data to Child Components
Option B: The parent component can invoke a public method in the child component.
Correct Method.
Calling Methods on Child Components
Options Not Suitable:
Option C: The parent component can use a custom event to pass the data to the child component.
Incorrect for Parent-to-Child Communication.
Option D: The parent component can use the Apex controller class to send data to the child component.
Not Appropriate.
Conclusion:
The parent component can pass a string value to the child component using Option A (public property) and Option B (public method).
These are the standard and recommended ways for parent-to-child communication in LWC.
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
A)
B)
C)
D)