JavaScript

{dialog.object}newRecord Method

Syntax

{dialog.object}.newRecord();

Description

Changes the current 'mode' from editing an existing record to entering a new record.

Example

{dialog.object}.newRecord();

Typically used if the component has been bound to one or more tables. The new record will be initialized with the default values for each control in the component. You can pass in an optional JSON object to indicate that the new record should be a copy of the record you are currently editing. The JSON object can indicate which (if any fields) you do NOT want to copy when cloning the existing record.

Example 

Create a new record that is a copy of the existing record, but do not copy the INVOICE_NUMBER and CUSTOMER_ID fields.

{dialog.object}.newRecord({cloneExisting: true, fieldsToNotCopy: ['INVOICE_NUMBER','CUSTOMER_ID']});

See Also