AutoSave Property

Version: Available or changed with runtime version 1.0.

Sets whether imported records are automatically written to the table.

Applies to

  • Xml Port Table Element

Property Value

True if the record is written to the table automatically; otherwise, false. The default value is true.

Syntax

AutoSave = false;

Remarks

This property applies to new records that are inserted into the table and existing records that are modified.

If AutoSave is set to false, then an imported record is not automatically written to the appropriate table. To insert or modify records manually, add code to the OnBeforeInsertRecord Trigger and the OnBeforeModifyRecord Trigger. For example, set the AutoSave property to false, create a new method that evaluates the records, does some calculations, or retrieves additional data, and then call your new method from the OnBeforeInsertRecord and OnBeforeModifyRecord triggers. Use the OnAfterInitRecord trigger if you must evaluate the records before inserting or modifying them, or if you want to calculate or retrieve additional data before inserting or modifying the record.

If a record already exists and AutoSave is set to true, then the values of the AutoReplace Property and the AutoUpdate Property determine whether the imported record overwrites or updates the existing record. If the record already exists and the values of the AutoReplace property and the AutoUpdate property are both false, then an error occurs.

AutoReplace Property
AutoUpdate Property