How does one detect if a NetSuite instance is a On...
# suitescript
d
How does one detect if a NetSuite instance is a OneWorld account or not? [I know this has been asked before, but we're seeing some odd behaviour now]
Here's how I'm currently checking
d
I have more often seen
runtime.isFeatureInEffect({ feature: 'SUBSIDIARIES' })
be used to make this determination instead, but both seem valid to me
b
i like the undocumented
Copy code
runtime.isFeatureInEffect({feature: 'subsidiaries'})
💯 2
suiteanswers gives the somewhat absurd feature detect by catching an error
d
Geez. I hate putting undocumented code in SuiteApps.
c
I have also used this. Only oneworld accounts have subsidiaries so its an easy check.
d
Which method did you use @creece?
s
I use
runtime.isFeatureInEffect({ feature: 'SUBSIDIARIES' })
as well
👍 2
d
Thanks everyone ... appreciate the feedback!
s
This also came up before in the certification exam question for the SS2 exam I took recently, not sure if this is a real question or a sample future question tho! but this is indeed the right way to check!!
d
Wow, really?
s
Yup! It was a question asking if there was the subsidiary field (?) which I don't remember correctly, but without oneworld, the subsidiary field isn't a selectable option, let me find it during the weekend and show you what I mean when I find the backup! I think it was either trying to test for oneworld although i'm not sure! My recent SS2 test tested probably 73ish questions, i think only 60ish questions were scored (and they dont tell you what they are) pretty sure this was one of them tho, at least it reminded me because it was something that came out on the course(?)
s
I've also seen a try/catch on creating a subsidiary record and catch means no one world
d
I've seen that as well @Sandii
c
That would be the "old" way to do it before the feature stuff