Search
 
 
Navigation
Directory
Functional Areas
Sales Automation
Marketing Automation
Customer Service
Partner Relationship Management
Website & Ecommerce
Order Management
Inventory Management
Services Management
Fulfillment
Billing, Time & Expense
Vendor Management
Employee Management
Financial Management
Body Mass Index Conversion and Calculation
Custom Pages that use SuiteScript Servlets
Set Commit Type
Error Handling SuiteScript Example
Custom Restriction SuiteScript Example
Post Sourcing SuiteScript Example
Client SuiteScript Template
Debug Script: Prompt for Save
SuiteTalk Customization Sample Application
Industries
All Solutions


Is New Record Check
company_netsuite_logo.jpg Problem:
Need to determine if a record is new, or previously saved. Then use the info to control code flow, performing some operations only on new records.
 
Solution:
Establish a global variable, is_new_rec, to track the record's state.
 
Use custom code on page init to determine if the record that just loaded has a record ID. New records will not have had an ID assigned yet. Set the is_new_rec field appropriately, which can then be used throughout the script.
 

Type of Code
Version 1.0
NetSuite Version (Minimum)
Script URL http://prdownloads.sourceforge.net/netsuiteroot/NS-IsNewRecordCheck.js?download
Date Created 6/18/2005
Last Modified 10/18/2005

Contributor: NetSuite Product Management

Contributor Overview: Founded in 1998, NetSuite, Inc. is the leading provider of integrated business application software for small and midsize businesses. With thousands of customers using NetSuite's online products and professional services, companies are enabled to manage all key business operations—in a single hosted system, including: customer relationship management (CRM); order fulfillment; inventory; finance and product assembly; ecommerce; Web site management; and employee productivity.

Website: http://www.netsuite.com