Tutorial of writing a SuiteScript 2.1 script in TypeScript on Mac using VS Code and uploading automatically to NetSuite with token-based authentication. In this exercise we learn how to implement a custom “Close Order” button on sales orders. This demonstrates user event, client, and suitelet SuiteScripts in NetSuite 2024.1.