Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
custom module: TypeError: Cannot find function libTest1 in object [object Object]
I created a simple custom module to get an example working to pull into a RESTlet. I keep getting the error, org.mozilla.javascript.EcmaError: TypeError: Cannot find function libTest1 in object [object Object] when calling a function in my custom module. I am not sure how to get around this error, any ideas?
Custom Module:
/**
* TestModule.js
* @NApiVersion 2.x
* @NModuleScope SameAccount
*/
define([], function(){
function test1(){
return 'hi';
}
return {
libTest1 : test1
}
});
RESTlet:
define(['N/record', 'N/error', './TestModule'],
function(record, TestModule) {
/**
* Function called upon sending a GET request to the RESTlet.
*
* @param {Object} requestParams - Parameters from HTTP request URL; parameters will be passed into function as an Object (for all supported content types)