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.
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
Incorrect Options:
Option A: force-input-field
Incorrect.
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
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.
Option D: Sending a change set between two orgs requires a deployment connection.
Correct.
Option E: Change sets can only be used between related organizations.
Correct.
Incorrect Options:
Option A: Change sets can deploy custom settings data.
Incorrect.
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.
Which statement generates a list of Leads and Contacts that have a field with the phrase 'ACME'?
A)
B)
C)
D)
Answer : B
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.
Option E: Static resources
Accessible.
Options Not Applicable:
Option A: All external libraries
Not All Accessible.
Option C: Third-party web components
Not Accessible.
A developer creates a custom exception as shown below:
public class ParityException extends Exception. {}
What are two ways the developer can fire the exception in Apex? Choose 2 answers
Answer : A, C
To fire an exception in Apex, the developer must use the throw statement along with an instance of the exception.
Option A: throw new ParityException();
Correct Way.
Creates a new instance of ParityException with no message and throws it.
Syntax is correct for throwing an exception.
Option C: throw new ParityException('parity does not match');
Correct Way.
Creates a new instance of ParityException with a custom message and throws it.
The exception class inherits from Exception, which allows passing a message to the constructor.
Options Not Correct:
Option B: new ParityException('parity does not match');
Incorrect.
This statement creates a new instance of ParityException but does not throw it.
Without the throw keyword, the exception is not fired.
Option D: new ParityException();
Incorrect.
Similar to Option B, this creates a new instance but does not throw it.
The exception will not affect the flow unless it is thrown.
Conclusion:
The two ways the developer can fire the exception are:
Option A: throw new ParityException();
Option C: throw new ParityException('parity does not match');
Both use the throw statement to fire the exception.