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
Defining Custom Module in Bundles
I'm working on using a custom module inside of my development NetSuite account.
In this example, I have a file called SS2_CustomModuleTest.js. It looks like this:
define([], function() { function ConvertNSFieldToFloat(value, blankIfNull) { if (blankIfNull) { if (value == null || value == '') return ''; else return parseFloat(value); } else { if (value == null || value == '') return 0; else return parseFloat(value); } } function ConvertLbToKG(lb) { return ConvertNSFieldToFloat(lb) * 0.453592; } function ConvertPSIToKPA(psi) { return psi * 6.8948; } return { ConvertLbToKG : ConvertLbToKG, ConvertPSIToKPA : ConvertPSIToKPA, ConvertNSFieldToFloat : ConvertNSFieldToFloat }; }); Then I have Suitelet script that looks like this:
/** * @NApiVersion 2.x * @NScriptType Suitelet * @NModuleScope SameAccount */ define(['N/ui/serverWidget', '/.bundle/125086/SS2_CustomModuleTest'], /** * @param
0