Hi there, I am getting the following error when at...
# suitecommerce
h
Hi there, I am getting the following error when attempting to add a variable to the
Header.Logo.View
using the
addToViewContextDefinition
function of the extensibility API:
INVALID_PARAM: The specified view_id (Header.Logo.View) is not valid for the current component or the callback is not a function.
However I can use the exact same code but change it to the
Header.Profile.View
and it executes fine. Is there something I'm missing about the Logo view? Has anyone else had this issue before? Here is my code snippet:
Copy code
layout.addToViewContextDefinition('Header.Logo.View', 'basel', 'object', function() {
    var header = container.getConfig('baselTheme.header') || {};
    return {
        resizeId: header.logoResizeId
    };
});
I have attempted adding a console log within the callback function at the start, but it doesn't even get to the log before the error above is thrown. Any assistance appreciated.
g
Have you tried just Header.Logo instead of Header.Logo.View?
k
There are a few views that don’t seem to be available to add context to….Header logo is one of them.
h
@Greg - yeah I tried that too. It gives a different error to say that the view doesn't exist. @kkennedydesign that's odd. Has NetSuite provided a reason behind this or raised a defect about it? Did you revert to wrapping the
getContext
function to circumnavigate the issue?
k
no - we just replace the view with a custom view if we need to change something
m
Many old practices needs to be changed with newer and future updates