0 votes

Hello,

I need to generate specific DataSynchro log files which contains some details that the client needs( number of records, number of errors, imported recors, rejected records ...)

PS: the import is scheduled.

Could you help me doing that please?

Thanks
Regards

asked in Utilities by (114 points)
retagged by

1 Answer

+1 vote
Best answer

Hey Akram

Take a look at topic "9.1 DataSynchro: EfficyStartJob and EfficyEndJob from the ServerJS tutorial. Based on that example, I distilled the following script that you could use to produce a tab separated file, for instance. The file is created by writing the TStringList object to disk

var ExportList,
    Folder = "C:\\temp\\";

function EfficyExportRecord(SourceDataSet, DestDataStore) {
  ExportList.Add(SourceDataSet("K_CONTACT") + "\t" + SourceDataSet("NAME"));  
  return false;
}
function EfficyStartJob(SourceRecordCount) {
  ExportList = TStringList.Create;
}
function EfficyEndJob(SourceRecordCount) {
  var file = Folder + 'EfficyExport.tab';
  ExportList.SaveToFile(file);
  ExportList.Free;
}
answered by (7.3k points)
selected by
1,231 questions
1,500 answers
1,835 comments
328 users