Im guessing the Details field when using N/log isn...
# suitescript
s
Im guessing the Details field when using N/log isnt free form text? I cant print information with \n. I mean i can print but it doesnt recognise \n
r
https://chrome.google.com/webstore/detail/netsuite-html-script-note/lipldhgjkmfhamocfcdijcdgjcikcbkk This works good for JSON. You probably just want to use JSON in debug logs.
s
once upon a time
details
could include HTML markup. They removed that years ago.
s
was just about to try JSON.stringify
Thanks
r
No need to stringify unless it's 1.0.
NetSuite APIs can often handle accepting various data types.
s
What im trying to do is have an array print its elements as new lines within the Details of the Execution log of the script
just to make it a little more readable
r
If you add the extension and send the array as is it should pretty print. An array is a valid JSON object in js.
s
log.audit({
title: "After Sublist Names",
details: array.join('/r/n')
})This doesnt work
ok ill give it a shot
r
I'm not sure if
An array is a valid JSON object
is true on second thought. Don't quote me on that.
s
Your recommended extension will work for now. Thanks @reptar
👍🏻 1