Check out Oracle NetSuite upcoming events and conferences here
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Update your Profile with your Support type to get your Support Type badge.
Expand your NetSuite knowledge by joining our Ask A Guru Live sessions. RSVP on this event now.
Don't miss out on our Question of the week! You only have until tomorrow, May 23, 2024, 2PM ET to comment your answers and earn rewards! Click here for more details.
Community Poll: What sort of content would you like to see more of?

Promise function not running in suitelet script

edited Dec 8, 2021 4:54AM in Ask A Guru 7 comments

I'm trying to run this suitelet to export excel using exceljs. But I have this line, it runs through this promise function and I got stuck. Log 'ok2' is not showing in Execution Log.

P/s: I tried Client Script and It works well but I need it run directly in a Suitelet. Because it needs to run as Administrator role.

var buf = wb.xlsx.writeBuffer();
log.debug('ok', buf);
buf.then(function(buf) {

As you can see from this log, it steps over 'ok2', no try catch here.

Normally in js, this function uses as async await but I cannot upload script with async await to netsuite. It occurs an error

Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!


Community Whiz

Quarter 2 ((Apr-Jun 2024) )

This Week's Leaders

This Month's Leaders

All Time Leaders