I have created custom tabs inside an object’s flexipage and I wonder if there’s a way to redirect via js or apex to this custom tab.
For example I want to be redirected to ‘Oferta’ tab after doing some custom development.
Thanks in advance
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
You can use standard__navItemPage
(Navigation Item Page Type) with lightning:navigation
here. Refer to the documentation for pageReference Types
those are utilized with the component for details. From documentation:
Navigation Item Page Type
A page that displays the content mapped to a CustomTab. Visualforce tabs, Web tabs, Lightning Pages, and Lightning Component tabs are supported.
Your navigation should look like as below:
{ "type": "standard__navItemPage", "attributes": { "apiName": "MyCustomTabName" // replace with the API name of your custom tab } }
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0