Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
How to search UnitsType / UOM (not Base Units) in SuiteScript 2.0?
Long story short, I'm being given the internal id for a unit of measure (unitstype) from a saved search that's been provided to me. I need to take that and match it to a base unit and conversion rate. What's the simplest way to do so?
search.create({ "type": "unitstype", "columns": ["internalid", "name", "unitname", "conversionrate", "baseunit"] });...returns everything, units, base units, the works! Great, right? But the given internal id of each unit is not the actual internal id, but rather the internal id of its base unit. Close but no cigar. Also unexpected and misleading.
Ok, how about instead searching directly for the internal id I've been given?
0