AxInternalBase.doSave Method [AX 2012]
Saves or updates a record.
Syntax
public void doSave()
Run On
Called
Remarks
This method does the actual work regarding inserting and updating a record.
This method performs the following tasks:
Executes the initValue method on the currentRecord table.
Defaults the fields on the currentRecord table.
Validates the fields on the currentRecord table if validateInput is set to true.
Executes the validateInput method on the currentRecord table.
Executes the write method on the currentRecord table.
Resets the internal values that are used by the class.
Examples
// This example applies to the AxSalesTable class.
AxSalesTable axSalesTable = new AxSalesTable();
SalesTable salesTable;
// Inserting a new record.
axSalesTable.parmCustAccount('3000');
axSalesTable.doSave();
// Updating a record.
select firstonly salesTable;
axSalesTable = AxSalesTable::newSalesTable(salesTable);
axSalesTable.parmSalesName('New Sales Name');
axSalesTable.doSave();