You need to sign in to do that
Don't have an account?
how to show parent related child record in lighting page using Lighting component
how to show parent-related child record in lighting page using Lighting component and also there should be filter functionality like if child record having status filed Status__c.
1. on page load parent-related all child record needs to show
2. If user select status value equal to Active then all active record need to show.
2. If user select status value equal to Inactive then all inactive record need to show.
Object parent object = Account
Child object = Contract
Contract object fields:- Name, Status, StartDate__c
I am new to lighting. please help me.
It's very very urgent
Thanks in Advance.
>> https://www.sfdckid.com/2019/08/salesforce-lightning-component-to-display-contacts.html
The above link has an example of showing related contacts in the lightning component you can simply replace this with contract soql.
Below is the example for quick reference:
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks.
{
@Auraenabled
public static list<Inventory_Line_Items__c> getRelatedList(Id recordId)
{
List<Inventory_Line_Items_c> Conlist =[ SELECT EPIC_Namec, Use_Case_Namec, Line_Item_Descriptionc, Salesforce_Vlocity_Component_Namec,Complexityc,New_Modifiedc,Unitsc,Adjusterc,Total_Daysc,Total_Hrsc FROM Inventory_Line_Itemsc where Estimator_Detail_c =: recordId];
return Conlist;
}
@AuraEnabled
public static void updateRelatedList(List<Inventory_Line_Items__c> Conlist)
{
if(Conlist!= null && Conlist.size()>0)
{
update Conlist;
}
}
}
plese help how to wwrite testclass with goverage more than 80%