moved log variables to prevent VNAVS when failing to read transaction record

This commit is contained in:
Infineon\StieberD
2025-06-24 19:41:20 -07:00
parent 7b386fe856
commit e523f2085d
2 changed files with 23 additions and 10 deletions

View File

@ -142,7 +142,6 @@ Service ProcessTransactionQueue()
hSysLists = Database_Services('GetTableHandle', 'SYSLISTS')
Lock hSysLists, ServiceKeyID then
LogPath = Environment_Services('GetApplicationRootPath') : '\LogFiles\Transaction'
LogDate = Oconv(Date(), 'D4/')
LogTime = Oconv(Time(), 'MTS')
@ -152,6 +151,8 @@ Service ProcessTransactionQueue()
objQueueLog = Logging_Services('NewLog', LogPath, LogFileName, CRLF$, COMMA$, Headers, '', False$, False$)
LoggingDTM = LogDate : ' ' : LogTime ; // Logging DTM
GoSub ClearCursors
Select 'TRANSACTION_QUEUE' by 'TRANSACTION_DTM' setting Cursor then
EOF = False$
Loop
@ -165,6 +166,9 @@ Service ProcessTransactionQueue()
Action = TransRec<TRANSACTION_QUEUE.ACTION$>
Table = TransRec<TRANSACTION_QUEUE.TABLE$>
Key = TransRec<TRANSACTION_QUEUE.KEY$>
LogData<3> = Action
LogData<4> = Table
LogData<5> = Key
HaveLock = Database_Services('GetKeyIDLock', Table, Key)
If HaveLock then
Begin Case
@ -212,9 +216,6 @@ Service ProcessTransactionQueue()
ErrorMsg = Error_Services('GetMessage')
end
LogData<1> = OConv(Datetime(), 'DT2/^H')
LogData<3> = Action
LogData<4> = Table
LogData<5> = Key
If ErrorMsg EQ '' then
// Log success
LogData<2> = 'Successfully processed transaction ':TransId:'.'
@ -230,3 +231,16 @@ Service ProcessTransactionQueue()
end service
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Internal GoSubs
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
ClearCursors:
For counter = 0 to 8
ClearSelect counter
Next counter
return

View File

@ -277,7 +277,7 @@ WRITE_RECORD_PRE:
Continue = True$
For each CriticalField in CriticalFields using @VM setting vPos
If ( ( (OrigRecord<CriticalField> NE '') and (Record<CriticalField> EQ '') ) or ( DCount(OrigRecord<CriticalField>, @VM) GT DCount(Record<CriticalField>, @VM) ) ) then
If ( (OrigRecord<CriticalField> NE '') and (Record<CriticalField> EQ '') ) then
WOMatFieldNos = Xlate('DICT.WO_MAT', '%FIELDS%', DICT_PART$, 'X')
WOMatFieldNames = Xlate('DICT.WO_MAT', '%FIELDS%', DICT_DISPLAY$, 'X')
Locate CriticalField in WOMatFieldNos using @VM setting FieldNo then
@ -929,4 +929,3 @@ Restore_System_Variables:
return