Huge Kudos to @RekHidalgo for being an initial colaborator and maintained this component for many release ๐
If you like this component, you could buy us a coffee:
This repository is a lightning component which mimimic the look and feel with the out of box related list but give you more control on:
- You can apply filter of your choice on the related list.
- You are not limited to child object but any grand-child object as long as it can reference back to the parent.
- You can specify the title of the related list that is meaningful to you.
- You are not limited to only four fields to show.
- You are not limited to 6 records but have more control on how many records you want to show,
- You don't have to show the ugly bar code for you child object.
- You can choose from display types of List or Tile.
- Text
- Number
- Percent
- Date
- Datetime
- Checkbox
- Picklist
- Muti-picklist
- Lookup
- Master-Detail
- Phone
- URL
- Clone this repo
git clone https://github.com/libra34567/lightningRelatedListWithFilter.git
- Direct to the root
cd lightningRelatedListWithFilter/
- Deploy to your desired org
sfdx force:source:deploy -p sf_relatedList -u $YOURORGNAME
- Clone this repo
git clone https://github.com/libra34567/lightningRelatedListWithFilter.git
- Direct to the root/package
cd lightningRelatedListWithFilter/package
- Ant deploy the package
![Deploy to Salesforce](https://raw.githubusercontent.com/afawcett/githubsfdeploy/master/deploy.png)
- Navigate to the parent object record page and click edit page
- Drag the RelatedListComponent to the desired space
- Type in the relevant attributes
- The related list will show
This field is used in the SOQL after FROM Clause. This is the API name of your related object, be careful with the letter case, it matters when you try to create a related record. It supports custom objects as well.
This the title of your realted list.
This field is used in the SOQL after SELECT Clause. Specify all the fields API name that you want to display for the related object. Seperate each field with a semi-column.
This field is used in the SOQL after ORDER BY Clause. If you want to sord your related list, specify the 'Order By' field and the sort order (desc or asc). Otherwise leave blank.
This field is used in the SOQL after WHERE Clause. You can use this field to filter your related list. Use the variable "recordId" to specify the relationship column (e.g. AccountId =: recordId) or otherwise the component will choose from all record.
This field is used to prepopulate the relationship field if the user clicks "New" button.
This field is used in the SOQL after LIMIT Clause. This will limit the maximum records showing in the related list. The remaining records can be seen by clicking "View More"
Choose from create,view and edit to show in the action list of the related record. User semi-column to seperate each action.
If you want to override the icon, choose the icon from https://www.lightningdesignsystem.com/icons/ (e.g. standard:Contact). Otherwise leave it blank, the component will choose the default icon from the Tab setting for this related object.
Choose from Tile or List.
If you find any issues with this demo that you can't fix, feel free to report them in the issues section of this repository.
If you have any suggestions for improvement or question of how to use this component, feel free to reach out to the collaborators at [email protected] | [email protected]