Determine if record is saved

Sometimes we need to determine in JavaScript if record is already saved or not. You can use this function for this:

/**
 * Check if we are creating a new record,
 */
function areCreatingNewRecord(){
  var record_id = document.getElementById("hdRecordID").value;
  if (record_id == '00000000-0000-0000-0000-000000000000'){
    return true;
  }else{
    return false;
  }
}
This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

4 Responses to Determine if record is saved

Leave a Reply

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