Irina Mitrova
09/20/2024, 7:06 AMCeligo AI
09/20/2024, 7:06 AMAI generated answer (using internal Slack threads):The delay in the appearance of the
ui/message
even though it is the first thing in the function's code could be due to the asynchronous nature of SuiteScript. When you call a Suitelet, it is an asynchronous operation, meaning that the SuiteScript engine does not wait for the Suitelet to complete before moving on to the next line of code.
In your case, the ui/message
is being created and displayed, but almost immediately after, the Suitelet is being called. The Suitelet call is likely taking some time to complete, during which the ui/message
is not being displayed. Once the Suitelet call completes, the ui/message
is then displayed.
To resolve this issue, you could try using a Promise or some other form of asynchronous handling to ensure that the ui/message
is displayed before the Suitelet is called. Alternatively, you could consider displaying the ui/message
within the Suitelet itself, if that is feasible for your use case.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
09/20/2024, 7:06 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.863698
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.862812698
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.857457221
Celigo AI
09/20/2024, 7:06 AM