Is it okay to add your own properties into the 'SC...
# suitecommerce
v
Is it okay to add your own properties into the 'SC' object that is globally accessible? (I'm developing extensions for SC 2019.2)
s
It's not great
v
I want to add some common properties that need to be consumed by Views from multiple extensions. I cannot fire queries to the back-end to refetch that info for every extension. What will be an ideal way to share that data? (Something like the SC global object.)
s
Depends on your data. We're pretty keen on using cached models and collections and then returning them as singletons
You could also use the configuration record if they're site-wide values
v
Yes, we're using the Configuration record for storing static values/configuration. But the info I'm trying to make global is dynamic (it should be fetched once every time the web store loads - a particular URL) and then made available for multiple Views.