Hi all, I have a report which updates a record from a setup table. This table has only one record and the mentioned report updates only one column of this record.
The problem is that i was doing some test and commented the line that makes table.GET but let the sentence table.MODIFY. After I ran the report the record of the table was blank.
Something like this:
// table.GET -> line commented
...
table.column := newvalue;
table.MODIFY;
Has anyone suffered this problem before?
Thanks
Comments
Without a GET or FIND no record should have been retrieved and thus there should be no record to modify.
I assume that MODIFY looks for a record with that primary key if one has not been retrieved. Since the key for most setup tables is a blank column I could potentially see that happening.
This code blanks the record:
This code produces an error because a record does not exist:
My Blog - nav.education
You should notify MS about it. Probably you hit a bug.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
A report is expected to retrieve and loop through all available records in a given data item. So if the code you refer to is in the OnAfterGetRecord of the Data Item then a record has been retrieved then regardless of whether you explicitly issued a get statment a record should have been retrieved.
Epimatic Corp.
http://www.epimatic.com
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!