Hi guys, I'm trying to use the `MyAccountMenu` `ad...
# suitecommerce
h
Hi guys, I'm trying to use the
MyAccountMenu
addSubEntry
function to add a link on the header menu. I define
MyAccountMenu
and execute the
getInstance
function, but I get an error that it's not a function. Strangely enough, when I log
MyAccountMenu
variable, it shows getInstance as one of it's functions. This is in SCA 2019.2
s
The MyAccountMenu component cannot be used to modify the header menu, only the side navigation.
Secondly, use
container.getComponent('MyAccountMenu')
. There's no need to get its singleton – use the methods described in the API documentation and the side nav will automatically re-render when changes are made
h
I've gotten it successfully on the side bar on My Account. However there's no link in the header dropdown
That prompted me to look at
Advanced/Header/JavaScript/MyAccountMenu.ts
thinking that the
addSubEntry
function is something I could call if I had it defined. I looked at the Frontend Extensibility API document for
MyAccountMenu
and I do not see that function there
s
@Hector Trevino Amaro i also faced the same issue. If you want to show it in header, then override Header.ts
Using MyAccountMenu component doesn't add the entry or subentry to header.
h
Thank you!