setAuditFlag Method

Class: Record

Description

This method sets the Update History flag for the specified object. You only need to activate the Update History flag if the table you are updating has a filer routine associated with it and you are going to use the Record.save method to save your changes. This method indicates whether any of the properties of an object have changed since the object was created. PSL builds an audit trail of all updated columns indicating the old value of the column. This enables the filer to properly fire triggers as well as store the change in journal files.

 

Because the compiler must build the audit trail code at compile time, not runtime, and labels are often called from other procedures, the compiler requires the indicator to build the audit trail be defined within each label.

 

Be sure to use this method in every section of code when the Record<Class>.save method is used. Also, ensure that property jounal=0 for updated columns for which a journal record is not required.

Syntax

objectName.setAuditFlag(literal Boolean status)

Parameters

status

0 to turn the audit flag off.
1 to turn the audit flag on.

Returns

Void

When Became Available

Profile v6.0

Example

type Number AMT = 1000.00

type String BOO = 10

type Number CID = 100000034

type RecordDEP dep = Db.getRecord(“DEP”,”CID=:CID”)

do dep.setAuditFlag(1)

set dep.bal = dep.bal + AMT

set dep.boo = BOO

do dep.save()                  // Call DEP filer