I’m using N/Log module in Client Scripts in my bundle. But got an error "TypeError: log.debug is not a function" in one of NetSuite Account that uses my bundle.
when I try to load N/Log module using the browser console N / log module is injected as a Suitelet 1.0 function instead of the Suitelet 2.0 Module.
My questions are:
- Is it possible to explicitly inject or redefine N/Log Suitelet 2.0 Module in Client Script?
- What can affect the injection of modules? (other scripts or NS configuration)
/**
*@NApiVersion 2.0
*@NScriptType ClientScript
*@NModuleScope Public
*/
define(
[
'N/record',
'N/search',
'N/currentRecord',
'N/url',
'N/https',
'N/runtime',
'N/ui/dialog',
'N/log',
'N/error',
],
function(
record,
search,
currentRecord,
url,
https,
runtime,
dialog,
log,
error,
) { ... }