I have a call to a .NET method (using a class inside a custom .NET dll) inside a FOR EACH. For some reason, the record in scope goes away after the call to the .NET method.
Any ideas?
can you post the portion of the affected code ?
What kind of method call is it? Is the call related to repositioning a Query using the Progress.Data.BindingSource?
There are problems with using methods inside FOR EACH blocks. See articles 000016292 and 000029112 in the knowledge base.
There is really nothing special about the for each.
FOR EACH bfttso_detail WHERE
bfttso_detail.lDisplayOnCCDevice BY bfttso_detail.display_seq:
IF cLine = "" THEN
cLine = bfttso_detail.cCCDeviceOutput.
ELSE
cLine = cLine + CHR(3) + bfttso_detail.cCCDeviceOutput.
ar.CreditCardPinPad:CCInterface:SendRequest(Dmsi.Agility.Payment.Commands:LinesDisplay, cLine).
/* This fails. Record is no longer available. */
ASSIGN
bfttso_detail.lDisplayOnCCDevice = NO
bfttso_detail.cCCDeviceOutput = "".
END.