[WD19] HReset before HAdd June 11, 2019 04:17PM |
Registered: 5 years ago Posts: 44 |
Re: [WD19] HReset before HAdd June 11, 2019 04:39PM |
Admin Registered: 5 years ago Posts: 501 |
José Antonio
Re: [WD19] HReset before HAdd June 13, 2019 09:58PM |
FOR ALL ROW OF TABLE_Line HReadSeekFirst(InvLine,usInvLineID,TABLE_Line.COL_usInvLineID) IF not HFound(InvLine) THEN CONTINUE Trace("found "+"InvLine.usInvLineID) HReset(InvLine) Invline.usInvLineID = TABLE_Line.COL_usInvLineID Invline.sItemRef = TABLE_Line.COL_sItemRef IF not HAdd(InvLine) THEN gp_TransactionCancel() bFlag=False Trace("error "+HError()) ELSE Trace("added ok") END END
Peter Holemans
Re: [WD19] HReset before HAdd June 14, 2019 03:41PM |
WHEN EXCEPTION IN // IF NOT (hAdd) THEN //Do error/warning handling here and get details with hErrorInfo() Info(hErrorInfo(hErrFullDetails)) END DO //Do exception logging and/or handling here e.g. by writing to a log file... ExceptionEnable() END