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.

 

rams Rookie Asked on September 17, 2019 in SuiteScript.

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.

on September 17, 2019.
Add Comment
1 Answers
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.

Beginner Answered on September 17, 2019.

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.

on April 28, 2020.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.