An email with Customer Statement can be sent via Workflow as well as via SuiteScript. The script below describes how to achieve this via Scheduled Script.
3. On NetSuite, navigate to Customization > Scripting > Scripts > New.
5. On the next page, select Scheduled.
6. On the new Script record page, put in the name you prefer for your Scheduled script.
7. Under Scripts tab, set Function = Scheduled.
8. Under Deployments, select a title preferred for a deployment along with other detail such as the schedule of when it will be run.
- nlapiSearchRecord() executes an existing Saved Search. Please note that it's required to have all fields to work with under the Saved Search > Results tab (e.g. internal id, email).
- nlapiPrintRecord() creates the Customer Statement as attachable file
- nlapiSendEmail() sends an email with the Customer Statement created in previous step nlapiPrintRecord()
Disclaimer: The sample code described herein is provided on an"as is" basis, without warranty of any kind, to the fullest extentpermitted by law. NetSuite Inc. does not warrant or guarantee the individualsuccess developers may have in implementing the sample code on theirdevelopment platforms or in using their own Web server configurations.
NetSuite Inc.does not warrant, guarantee or make any representations regarding the use,results of use, accuracy, timeliness or completeness of any data or informationrelating to the sample code. NetSuite Inc. disclaims all warranties, express orimplied, and in particular, disclaims all warranties of merchantability,fitness for a particular purpose, and warranties related to the code, or anyservice or software related thereto.
NetSuite Inc. shall not be liablefor any direct, indirect or consequential damages or costs of any type arisingout of any action taken by you or others related to the sample code.