I have been chasing my tail all day.
We have an external system that programmatically will log a user into SuiteCommerce Advanced calling the ModelsInit.session.login function, then redirecting the user after the fact. This works and the user will get to tehshopping section just fine.
However when leaving the shopping section to go to the My account section the site bombs in the MyAccountEnvironment.ServiceController as it to access variables on the Environment as it says it is undefined. Specifically the below code when it tries to access currentCurrency. The weird part is it looks like the ShoppingEnvironment call does the same thing and it works fine, all variables are there.
Does anyone have any ideas on what could bethe culprit here?
Environment = Application.getEnvironment(this.request);
.....
myAccountEnv.SESSION = {
currency: Environment.currentCurrency,
language: Environment.currentLanguage,
priceLevel: Environment.currentPriceLevel,
touchpoints: SiteSettings.touchpoints
};