Marty Zigman

Conversations with Marty Zigman

Certified Administrator • ERP • SuiteCloud

Tip: NetSuite Custom Records and Built-in Timestamp Date Information

NetSuite Technical

Tags: , , , ,

Here is a quick NetSuite SuiteScript development tip that isn’t well documented.

When you create custom records in NetSuite, all the fields you recreate are well named — by you.  Hence you can reference these easily in your code because you named them.  However, what if you need to get to NetSuite’s built-in date timestamp information?

The date timestamp field names are as follows:

  1. Date Created: “created”
  2. Last Modified: “lastmodified”

Sample NetSuite Timestamp SuiteScript Code

Here is some sample code:
var custrec = "customrecord_btc_trx_request";
var id = 1543;
var custrecord = nlapiLoadRecord(custrec, id);

nlapiLogExecution('DEBUG', 'value of created ', custrecord.getFieldValue('created') );
nlapiLogExecution('DEBUG', 'value of lastmodified ', custrecord.getFieldValue('lastmodified') );

Summary

If you are considering enhancing your NetSuite account to improve your business operations and need help, contact us.

Marty Zigman LinkedIn

Marty Zigman

Marty Zigman's holds 3 NetSuite certifications:  ERP Consultant, SuiteCloud Developer, Administrator Holding three official certifications, Marty is widely recognized as a top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. A former Deloitte & Touche CPA and technology executive with CTO roles, he brings over 35 years of leadership in ERP, CRM, and eCommerce business systems. Contact Marty to engage directly.

Biography • YouTube • LinkedIn • X (Twitter)

2 thoughts on “Tip: NetSuite Custom Records and Built-in Timestamp Date Information”

  1. Hi Marty, I hope my message finds you well. Is it possible to add a custom field similar to file attachment ? So can the custom field be of type File ?
    Cheers,
    Leon

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *