Skip to main content

Configuration File Tags: targetConfigs

targetConfigs:
Configure the component for different page types and define component properties.
For example, a component could have different properties on a record home page than on the Salesforce Home page or on an app page.
For Communities, only lightningCommunity__Default supports component properties.

Supports the targetConfig subtag:

Use a separate targetConfig for each different page type configuration. Specify one or more page types in the targets attribute, such as
 <targetConfig targets="lightning__RecordPage"> or 
<targetConfig targets="lightning__RecordPage,lightning__AppPage">

The targets attribute value that you specify must match one or more of the page types that you listed under <targets> for the component.
Supports the property, objects, and supportedFormFactors subtags.

property:
Specifies a public property of a component that can be set in Lightning App Builder, App Manager, Lightning Flow Builder, or Community Builder. The component author defines the property in the component’s JavaScript class using the @api decorator.

The property tag supports these attributes:

color:
Syntax: <property name="backgroundColor" type="Color" default="rgba(0, 255, 255, 1)">
REQUIRED : No

datasource:
Renders a field as a picklist, with static values. Supported only if the type attribute is String.
Syntax: <property name="Name" datasource="value1,value2,value3" />
You can also set the picklist values dynamically using an Apex class.
<property name="Name" datasource="apex://MyCustomPickList"/>
See Create Dynamic Picklists for Your Custom Components for more information.
REQUIRED : No

default:
The default value for the attribute.
REQUIRED : No

description:
Displays as an i-bubble for the attribute in the tool.
REQUIRED : No

label:
Displays as a label for the attribute in the tool.
REQUIRED : No

max:
The maximum allowed value for an attribute of type Integer. Not supported if the target is lightning__FlowScreen.
REQUIRED : No

min:
The minimum allowed value for an attribute of type Integer. Not supported if the target is lightning__FlowScreen.
REQUIRED : No

name:
Required if you’re setting properties for your component. The attribute name. This value must match the property name in the component’s JavaScript class.
REQUIRED : Yes

placeholder:
Input placeholder text for the attribute when it displays in the tool. This text is the ghost text in text fields and text areas before a user starts typing. Supported only if the type attribute is String.
REQUIRED : No

required:
Specifies whether the attribute is required. The default value is false.
REQUIRED : No

role:
Specifies whether the attribute is inputOnly or outputOnly. If you don’t specify the role attribute, the default value allows input and output. For example, if a property is restricted to outputOnly, users can’t set its value from a Lightning record page. Supported only if the target is lightning__FlowScreen.
REQUIRED : No

type:
The attribute’s data type.
To specify a list, add array notation [] to the end of any data type.
These values are valid for all targets:
Boolean
Integer
String
These values are valid only if the target is lightning__FlowScreen:
apex://namespace.Classname—An Apex class used for an Apex-defined data type.
Date—A date in ISO 8601 format.
DateTime—A datetime in ISO 8601 format.
@salesforce/schema/namespace__Objectname or @salesforce/schema/Objectname—An object.

Classname—The name of the Apex class.
namespace—The namespace of the Salesforce organization. Specify a namespace unless the organization uses the default namespace (c), in which case don’t specify it.
Objectname—The name of the object.

REQUIRED : Yes

objects

A set of one or more objects the component is supported for. This tag set works only inside a parent targetConfig that’s configured for lightning__RecordPage. Specify the objects tag set only once inside a targetConfig set. Supports the object subtag.
Defines which objects the component is supported for. Use one object tag for each supported object. You can’t use ‘*’ to denote all objects.
See the User Interface API Developer Guide for the list of supported objects.

supportedFormFactors

A set of one or more form factors or devices that the component supports. Specify the supportedFormFactors tag set once inside a targetConfig set. Supports the supportedFormFactor subtag.
Defines which form factor or device the component supports. Use one supportedFormFactor tag for each supported form factor.
The supportedFormFactor tag supports these attributes:
Device form factor on which the component displays. Valid values are:
Large—Represents the desktop form factor. Supported for all page types.
Small—Represents the phone form factor. Supported for lightning__AppPage only.

Comments

Popular posts from this blog

Platform Developer I Certification Maintenance (Winter '23)

 Maintain Your Platform Developer I Certification for Winter ’23 1. Field update actions have changed in API Version 54.0. Which record-triggered flows do field update actions now execute? Answer: Before-Save after After-Save 2. Which Apex class is used to determine the hostnames for the domains that Salesforce hosts for your org? Answer: System.DomainCreator 3. Which modules can be used for notifications in a Lightning web component instead of native APIs? Answer: LightningAlert, LightningConfirm, and LightningPrompt 4. What determines an org’s “shape” in Salesforce? Answer: Features, settings, edition, limits, and licenses 5. Which lightning-modal-* component is required to create a modal? Answer: Body 6. How do you call an invocable action from Apex code? Answer: Reference Invocable.Action Get Hands-On With Apex Assertions 1. Create Two Apex class: Copy and Paste below codes (A.) TestFactory @isTest public class TestFactory {    public static Account getAccount(String accountName, B

Administrator Certification Maintenance (Spring '23)

 Maintain Your Administrator Certification for Spring '23 1. What information is listed in the Details panel for recently used reports? Answer: A, B, C 2. What is used to give sales reps access to a guided process to import contacts and leads? Answer:  Sample CSV file 3. Which feature efficiently removes inactive picklist values? Answer: Bulk Delete Unused Values 4. Which type of Process Builder processes can be converted using the Migrate to Flow tool? Answer: Record-triggered Get Hands-on with Enhance Record Pages With Dynamic Forms Follow steps show in Screenshot also highlighted with Red Box:

Platform App Builder Certification Maintenance (Winter ’23)

Maintain Your Platform App Builder Certification for Winter ’23 1. What component customizes related lists directly from the Lightning App Builder? Answer:      Dynamic Related List – Single 2. Where can a debug flow test be created and saved? Answer:      Flow Builder 3. What action enables smart email auto-responses in Flow Builder? Answer:      Create Article Recommendations 4. Custom address fields improve address data accuracy for your users using what type of list? Answer: State and Country/Territory Picklists 5. What are the benefits of using Dynamic Forms on record pages? Answer:      Place fields anywhere on the page  Use Visibility Rule to show and hide fields  6. Restriction or scoping rules now allow multiple values. When should double quotes surround a value? Answer:      If a single value contains a comma  Get Hands-On With Permission Set Expiration Verify before performing this: Permission Set & Permission Set Group Assignments with Expiration Dates should be enabled

Translate