Giter VIP home page Giter VIP logo

netsuite-close-po-items's Introduction

NetSuite-Close-PO-Items

Project Overview

emailexample

Purpose

This project automatically closes individual line items on all purchase orders based on the received, billed, and on order quantities. It is a scheduled script that runs every weekday at 8am and sends out a summary email of all the changes made.

Features

  • Automated Emails
  • Setting Sublist Field Values
  • Automatic Purchase Order Closure
  • Saved Searches

Prerequisites

  • SuiteScript/JavaScript
    • Modules: N/search, N/record, N/email
    • SuiteScript Types: Scheduled Script
    • API Version: 2.x
    • JSDoc Tags
  • Saved Searches

Project Setup

Saved Searches

Be sure to note the saved search ID.

  • Search to Closed PO Items:
    • Function: collects all the open purchase order line items; used to find internal IDs of purchase orders that have closeable line items
    • Search Type: Transaction
    • Criteria: Record Type starts with purchaseorder, Closed is false, Main Line is false
    • Result Columns: Document Number, Item : Name, Closed, Quantity, Quantity Billed, Quantity Fulfilled/Received, Status, Line ID, Internal ID
    • Permissions: Public

Uploading to NetSuite

  • Adding a SuiteScript to the File Cabinet: navigate Customization>Scripting>Scripts>New; next to the "Script File" dropdown, press the plus sign to upload a new SuiteScript file; select the NetSuite folder that you want to store the SuiteScript files in; under "Select File," press the "Choose File" button; select the SuiteScript file that you want to upload and press open; save and press the blue "Create Script Record" button; name the file, input a relevant ID, and save

File Descriptions

close_po_scheduled.js

  • Programming Languages: JavaScript, SuiteScript 2.0
  • SuiteScript Type: Scheduled Script, execute
  • Description: sets closeable purchase order line items as closed; sends summary email of changes
  • Catering the Code to Your NetSuite:
    • Changing the Saved Search IDs: whenever there is a search load instance (search.load), change the parameter "id" to the correct search ID
    • Sending Email to Different Recipient: find where the email is sent (email.send) at the end of the program; change the "recipients" parameter to the correct email address; add more than one recipient by putting the emails as an array of strings
    • Changing the Email Sender: find where the email is send (email.send) at the end of the program; change the "author" parameter to the correct employee internal ID; find employee internal IDs by navigating Lists>Employees>Employees and locating the correct employee; can only choose one author for the email
  • Deploying SuiteScript: go to the SuiteScript file; press the "Deploy Script" button; enter a name and relevant ID; change the status to "Testing"; press the blue "Save" button and choose "Save and Execute"; once the code has been tested, change the status to "Scheduled"; under "Execute As Role," choose "Administrator" so that the code will get full access to NetSuite and will not create any permissions errors; under the "Schedule" subtab, choose the schedule that the SuiteScript should execute on (Daily Event, Repeat every weekday, start time 8:00am) itemclosure

References

Helpful Links

Extra Tips

  • Choose to execute as the administrator role when deploying the SuiteScripts to make sure everyone has full permissions
  • Be sure to check the global permission in all of the saved searches
  • Go back to the script deployments to check that their status is "Released" and that their audience includes all roles

netsuite-close-po-items's People

Contributors

elizabethpursell avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.