0

Question: is there a way to use a developer name of listview in a standard_recordrelationshipPage?

In Account object I created a custom single related list in LWC called Active Campaign Related List.

This is my code when clicking view all in footer to navigate to the all active campaign:

handleViewAll{
  this[NavigationMixin.Navigate] ({
      type: 'standard__recordRelationshipPage', 
      attributes: {
         recordId: this.recordId, 
         objectApiName: 'Account', 
         relationshipApiName: 'CampaignMember', 
         actionName: 'view' 
      } 
  });
}

output: (keeps on going to campaign history it should be all active campaign only) and i have a list view (developername: AllActiveCampaign ) enter image description here

Is there a way to call this listview developername?

1 Answer 1

0

The list view and related list are two different things. You cannot customize the related list to show a list view based on record id out of the box inside salesforce.

For example:- On an account record, the contact related list will show all the contacts associated with it. You can not show a list view on the related list.

Coming to standard__recordRelationshipPage pagereference type, it has just four attributes:-

  1. actionName- The action name to invoke. Only view is supported.
  2. objectApiName- The API name of the object that defines the relationship. Optional for lookups.
  3. recordId- The 18 character record ID of the record that defines the relationship.
  4. relationshipApiName- The API name of the object’s relationship field.

Currently, you have to rely on custom component as permanent filter is not available for related list.

2
  • oww i see, thank you very much. actually I used navigation mixin on view all button. But thank you so much I guess it is not possible Commented Oct 15, 2021 at 9:06
  • @salesforce_newbie You can accept the answer if it had solved your doubt. Commented Oct 16, 2021 at 1:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .