Wednesday, May 5, 2010

For getting the current DAteTime when ever we change or edit any field (Using Rowsets)

For getting the current DAteTime when ever we change or edit any field (Using Rowsets)

Write the following below code in the Record Level in Save Prechange

Local Rowset &RS0, &RS1, &RS2;

&RS0 = GetLevel0();
&RS1 = &RS0(1).GetRowset(Scroll.SRI_STUORG1_TBL);
For &I = 1 To &RS1.ActiveRowCount
&RS2 = &RS1(&I).GetRowset(Scroll.SRI_STUORG4_TBL);
For &J = 1 To &RS2.ActiveRowCount

If &RS2.GetRow(&J).IsChanged Then

&RS2.GetRow(&I).GetRecord(Record.SRI_STUORG4_TBL).GetField(Field.SRI_STUORG_DTTIME).Value = %Datetime;
End-If;

End-For;
End-For;

No comments:

Post a Comment