RE: log.debug not working in Client Script pageinit
Answered
Hello Everyone,
log.debug to test the output values is not working in ClientScript pageinit function.
(Just an example below)
function pageInit(context){
var x = 10;
log.debug({
title: ‘Test’,
details: x
});
}
Please help me. Thanks.
Best answer
log.debug or any other type of log methods does not work in Client script. You need to use console.log in client script.
Not true. It seems to work sometimes but not others. For example, I just used log.debug successfully in a pageInit function, whereas I can’t get it to work in a button event handler.
battk
Some important information is how the client script was added. Was it added by a suitelet or user event script? Or is it a regular client script.
Some other information like why you want to use log.debug vs console.log generally helps. I personally have never bothered with log,debug if you want to output values in a client script.