JmgCleanupTermReg.delete Method [AX 2012]
Deletes records from the JmgTermReg table or the JmgTermRegArchive table fetched from the specified query run.
Syntax
private void delete(QueryRun _queryRun)
Run On
Called
Parameters
- _queryRun
Type: QueryRun Class
The instance of the QueryRun class that references either the JmgTermReg or JmgTermRegArchive records that should be deleted.
Remarks
The records are deleted by using the doDelete table method.
Examples
The following example demonstrates the use of this method.
public void run()
{
QueryRun qr;
#AviFiles
super();
ttsbegin;
startLengthyOperation();
qr = this.initQueryRun();
this.progressInit("@SYS39821", SysQuery::countTotal(qr), #AviFileMove);
switch (cleanupMode)
{
case JmgTermRegCleanupMode::ToTable:
this.archiveToTable(qr);
break;
case JmgTermRegCleanupMode::ToFile:
this.archiveToFile(qr);
break;
case JmgTermRegCleanupMode::Delete:
this.delete(qr);
break;
}
endLengthyOperation();
ttscommit;
if (caller)
{
caller.dataSource().research();
}
}