Hi all, I am trying to use GlobalViews.CountriesDr...
# suitecommerce
p
Hi all, I am trying to use GlobalViews.CountriesDropdown.View in an extension. But unable to do so as an error is thrown --- Script error for "GlobalViews.CountriesDropdown.View", needed by: View. This seems weird because GlobalViews.Message.View works fine in extensions. On further inspection I found that GlobalViews.CountriesDropdown.View has an error in reference path for UnderscoreExtended. Is this the issue? How can I use GlobalViews.CountriesDropdown.View with extensions?
s
Are you trying to access this view in the shopping application? Because it is not available there.
p
Yes in shopping application. Is there a way to get it there? @Steve Goldberg
s
If it's SCA, you can add it to the distro.json file. If it's SC, no.
p
Its SCA. Added the entry to distro but getting another error "http://localhost:7777/global_views_countriesDropdown.tpl.js net::ERR_ABORTED 404 (Not Found)".
s
SCA 19.2?
p
yes
s
I think you might need to declare a definition file for the template then
Or generate one
p
By definition file do you mean the d.ts file? Its already present In GlobalViewsModule
s
Yes it would, wouldn't it. I think the problem is that there isn't a generated version of it. Clean the local distribution rebuild it; it may not generating one because it is not used anywhere in the application. You may need to add it as a dependency to an arbitrary file to get it to generate, but I honestly don't know for sure