Apologies if this question doesn't make sense. I'm fairly new to Salesforce and LWC.
I am creating a component for the Service Console on the Account page. Essentially I want it to return a list of Contact records that are related to the Account that is currently being viewed. I know there are standard components that do this, but I need to add some custom functionality.
I have created a List View with no filters that just returns all Contacts, but obviously I want to do the filtering to get the related Contacts on the server side, not the client side.
If it's not possible to do this with getListUi
then I guess I'll have to use APEX + SOQL.
@track contacts;
@wire(getListUi, { objectApiName: CONTACT_OBJECT, listViewApiName: 'Test_View' })
wiredContent({data}) {
if (data) {
this.contacts = data.records.records;
}
}