while I understand how one could navigate from one Standard Page to another within an LWC component, navigating to Object Page within a Community Site is very troublesome to me. I've seen this example in the eBikes Demo:
handleNavigateToRecord() {
this[NavigationMixin.Navigate]({
type: 'standard__recordPage',
attributes: {
recordId: this.recordId,
objectApiName: PRODUCT_OBJECT.objectApiName,
actionName: 'view'
}
});
}
however, the similar approach doesn't seem to work well in my project.
handleViewDetails() {
this[NavigationMixin.Navigate]({
type: 'standard__recordPage',
attributes: {
recordId: this.caseId,
objectApiName: 'Case',
actionName: 'view'
}
});
}
First thing, my Object Page (Case Detail) has a custom base url (/case-list/(recordId)). The Navigation Service instead redirects to /detail/recordId. It results in an error: Invalid Page, which of course makes sense, because such page indeed doesn't exist. So my question is: is there something wrong in my code? Perhaps it should be handled differently?