#1 2016-11-10 18:53:11

Antonio
Member
From: Porto Alegre - Brasil
Registered: 2013-03-26
Posts: 18
Website

Audit Trail

I tried to use the audit trail but it did not work.

Does not return anything, although there are records in the history table

See my code

  aOrcamento := TOrmerc_Orcamento.Create;
  aHist := TSQLRecordHistory.CreateHistory(aClient,TOrMerc_Orcamento,1);
      aHist.HistoryGet(i,aEvent,aTimeStamp,aOrcamento);
  try
    memo1.Lines.Add('Number of items in the record history: '+inttostr(aHist.HistoryCount));
    for i := 0 to aHist.HistoryCount-1 do begin
      memo1.Lines.Add('Event: '+GetEnumName(TypeInfo(TSQLHistoryEvent),ord(aEvent))^);
      memo1.Lines.Add('TimeStamp: '+TTimeLogBits(aTimeStamp).i18nText );
      memo1.Lines.Add('Value: '+aOrcamento.GetJSONValues(true,true,soSelect));
    end;
  finally
    aHist.Free;
    aOrcamento.Free;
  end;

Offline

#2 2016-11-10 19:47:31

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,238
Website

Re: Audit Trail

Please check with the regression tests to see how it works.

Offline

#3 2016-11-10 21:21:43

Antonio
Member
From: Porto Alegre - Brasil
Registered: 2013-03-26
Posts: 18
Website

Re: Audit Trail

Hi AB,


I did not find examples of using the audit trail, nor in the forum.

The example I made was based on item 5.9.2 of the documentation.

Sorry for my ignorance, but how do I check with the regression test?

Offline

Board footer

Powered by FluxBB