GlideForm - isNewRecord()

Returns true if the record has never been saved.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
Boolean Returns true if the record has not been saved; otherwise false.

function onLoad() {
   if(g_form.isNewRecord()){
      alert('New Record!');
   }
}