Introduction :
PWR Related List component can show the data directly derived from the related object like the standard related list provided by Salesforce and is also capable of showing customized data derived from classes on the Lightning UI. This component is Lightning and Mobile Compatible. PWR Related List has two views
Table View
Card View
PWR Related List component allows the users to show fields from the parent object. PWR Related List can show data that is present in filtered format and is defined in Apex business logic.
Example: If two objects’ data are combined and need to be shown in a single line which is defined in Apex class can be easily configured and shown through the Related List. In order to configure PWR Related List, there are three objects named Field Set, Field, and Actions provided with the package. The user can create custom actions other than Edit, Delete and View under the object Actions.
Prerequisite Configuration:
If the data coming from a custom class needs to be displayed on the Related List, then create Field set Record and then create the Record on the Fields object which will represent the column of the Related List. Even if the data is not coming from a custom class, the user can still use the Field set object for displaying the data coming from a related object. For displaying actions on Related List create actions like View, Edit, Delete, etc. on the Actions object.
Steps to Creating Related List setting:
...
Go to the Designer tab
...
...
PWR Components offers a variety of highly configurable LWC components.
PWR Components List | ||
---|---|---|
How to Configure and Add Components
In this section, you will learn how to configure one of the components, such as the Related List. You can follow the same steps for other components, with slight variations, and add them to your desired location within a Lightning page, Community page, or Screen Flow.
Related List
With the help of a related list, the user can show the related data of objects and the user can show the data up to 3 the level hierarchy.
...
Steps to create related list config:
Open PWR Components application from App Manager
Go to the Designer tab
Select the Related List component from the list of components
You Users can use existing settings Config, or you users can create a new settingsConfig
Create New Setting
Steps to create Field Set:
The Fields and Field Set have a master-detail relationship.
Go to the Related List Field Sets tab
Click on the new button
For configuring the Field Set, the properties below need to be set properly
Name: Enter the Field Set Name
Object: Enter the API name of the object for which the Field Set is being created
** If the Field Set is being created for displaying the data fetched using Apex Class, then the API name of the object is not required.
Steps to create Field:
The Fields need to be created under the Field Set object.
Go to the Related List Fields tab
Click on the New button
For configuring the Field, the properties below need to be set properly
Label: The Label of the field can be changed for displaying on the Related List UI
Column Sequence: Sequence of Field can be set and controlled
Is Card Field: Which field among the Fields in the Field Set needs to be shown in the card view
Highlighter: In the case of Custom Class, the Highlight functionality can be used. If in a single related list there is data from two different objects and the first row represents data of object1 and the row below it shows the data from object2 you can Highlight any of the rows depending on the value present on the Fields record
Link URL & Link Field: In the case of Custom Class, the Link URL functionality can be used. If in a single row of a related list there is data from two different objects and the second column represents the field of Object2 and User wants the link to that object, then the User needs to set it in the Link Field URL and Link Field Id
The Date and Date/time fields can be shown in many custom formats using the Custom Date Format field. For example, the Date (1/1/2019) can be shown as 31-Aug-2020
Here are the details around different properties, and what valid information can be input for the same.
Configuration Section:
Data Source: Selected data source is reflected in this field
Object: If the data source is an Object, then the selected object name is reflected here
Class Name: If the Data Source is Chosen as a Custom Class, then the Class Name of the Class needs to be entered. When the Data Source is chosen as Custom Class the Field Source should be Field set only
Record to Preview: Select the record for preview
Related Object: Select the object whose records you want to show
Label: Shows the label for the PWR List View on the UI (By default setting name is displayed as Label, you can change the label as per your requirement)
Icon: This property is used to set an icon for the PWR List View. For example, standard: account. For more details about the icons, please refer to the link here
Hide Row Number: Users can hide the serial number column but check this checkbox
Hide New Button: This property enables users to either show or Hide the New button so users can create a new record
Information Source:
Field Source: The User needs to select the field source as either of the values given below. By Default, Fields are selected as Field Sources
Field: The user needs to select the fields which the user wants to see in the Related list
Field Set: When the ’Field Source’ is chosen as ’Field set’ it will show the order of the fields as mentioned in the Field Set
Fields & Field Set: When the ’Field Source’ is chosen as ’Fields and Field set’ it will take the fields from the ’Field set’ and then the User needs to select the fields in the ’ Fields’. While displaying it will display the fields which are selected first and then the Fields of the Field set
Field Set & Field: When the ’Field Source’ is chosen as ’Field set and Fields’ it will take the fields from the ’Field set’ and then the User needs to select the fields in the ’Fields’. While displaying it will display the fields of the Field set first and then the Fields
Field Set Name: The name of the Field set defined on the object Field set needs to be selected this property
Fields: The user needs to select the Fields to be displayed and also User needs to select the card fields or else in the mobile view it will only show the name
Note: If the Field Source is chosen as Fields, then the user needs to enter the API names of the field in the Fields property, and also the User needs to select the card fields, or else in the mobile view it will only show the name.
Display Configuration:
Display Type: Select the display type for the records, currently, it supports two views:
Table View: Records and information are displayed in table format
Card View: Records and information are displayed in card format. The card view supports only 5 fields at maximum
Card Fields: The user needs to select the Fields to be displayed on the card view Note: The user needs to select the fields in the Fields property and then Card Fields or else it will not show up in the card view
Records To Display: Stores the number of records needed to be displayed on the first load of the page
Action Configuration:
Actions: The user need to select the available actions from the list of actions
Steps create Actions: The user need to select the available actions from the list of actions
Go to the Actions object
Click on the new button
Fill in all the details
Name: The user needs to add the Action Name
Action Sequence: Enter the sequence of action
Parameters: Enter Parameters
Operation Type: Select a particular operation from the list
Navigation Target: select navigation target same tab or new tab
Component URL: Enter the URL of action
Click on save
Filter Criteria : When a user wants to view the Related List in the filtered format then the user can add the filter criteria in this section. By using filter criteria users can view the List View that the user wants.
Click Add Filter and select a Field to Filter from the list
Select an operator for the filter and type the filter value in the next field
Click Apply
After adding a filter to your List View, the filter is numbered. Your first filter becomes Filter 1 and your second filter becomes Filter 2. You apply filter logic based on these numbered filters
For example, you want to show contacts related to accounts which have Lead Source is Web and Email not Null. Your Related List has two filters:
Lead Source is ‘Web’
Email not Null To add filter logic,
From the Filter Criteria, click Filter Criteria section Add Filter Logic
Enter each filter line number, separated by a filter logic operator
Configuration Details:
From Setup, enter App Builder in the Quick Find box, then select Lightning App Builder
Click New and select any one of the Record Page and enter the Name of the page, select the screen layout, and finish the steps of the wizard
In the components panel under the Custom-Managed option PWR Related List is present. Drag and drop it to the Record page
Preview Section:
...
If the user creates a new config
Label: Here user can set the title for the config of the component
Name: The API name of the label is shown here
Page Type: Here user can select page type as record page or non-record page; depending on which page the user wants to show the component
Non-Record Page: By choosing the non-record page user can use this config on the home page and app page.
Record Page: By choosing the record page user can use this config on a related record object
Object Name: Here user can choose any object on which that created config will be shown
Once the configuration is successfully saved, provide additional details from the Attributes section to build your component according to your specific requirements.
...
Attributes:
Related List Icon: Select an appropriate icon for your component.
Record Object: The object name is automatically selected based on the object you chose when creating the configuration.
Record To Preview: Select the record to preview to check how your component will look based on that record.
...
Child relationship: The ”Child relationship” field allows you to choose the child object you want to display in the related list.
Info |
---|
Note: You can navigate and select up to 3 levels down to child objects and three levels up to parent objects. |
...
Object Name: Selected child relationship object name will be auto-populated here in read-only format. If no child relationship object is selected, then by default, the record object is auto-populated in this field, or else here you have to choose an object.
...
Display Fields: Use this option to add fields that will be displayed in the related list.
Info |
---|
Note: Fields from the object selected in the Object Name option will be visible here. |
...
Show Search: The ”Show Search” checkbox allows you to enable or disable the search functionality within the related list. Search Bar will be displayed at the top of the related list.
Search Fields: Add the fields that can be used to search within the related list.
Info |
---|
Note: Fields from the object selected in the Object Name option will be visible here. |
...
Filter Criteria: Specify the filter to display specific records in the related list.
...
Show Checkbox: The ”Show Checkbox” option allows you to display or hide check boxes next to each item in the related list.
Max Selected Record Count: The ”Max Selected Record Count” field allows you to set a maximum limit for the number of records that can be selected in this related list.
Page Size: The ”Page Size” option allows you to specify the number of records displayed per page in the related list.
...
Order By: Specify the order in which to display the records by record field, either in ascending or descending order.
...
Table Action: User can create multiple table actions
Info |
---|
Note: By default, a New Action is provided. You can also add other actions to perform additional tasks. Please refer to the Table Actions section for more information. |
...
Row Actions: You can multiple row actions here
Info |
---|
Note: By default, a View, Edit & Delete Actions is provided. You can also add other actions to perform additional tasks. Please refer to the Row Actions section for more information. |
...
Padding Location: Defines the position of the padding for a component. The padding creates extra space within a component.
...
Padding Size: The padding size of the component can be set to:
...
Margin Location: Defines the position of the margin for a component. margin creates extra space around a component.
...
Margin Size: The margin size of the view can be set to:
...
After clicking the Save button, the configuration will be saved.
Preview Section: Once everything is saved, you can preview the component in the Preview section.
...
PWR Related List screenshots:
PWR Related List
...
on Record Page:
PWR Related List
...
on Home Page: