One of our customers, want a batch report that will reopen and release all Purchase Order.
I created a batch report with the Purchase Header dataitem and wrote the following code in OnAfterGetRecord
ReleasePurchDoc.PerformManualReopen("Purchase Header");
ReleasePurchDoc.PerformManualRelease("Purchase Header");
However, now when I run the report, I get error messages such as: There is no Tax Area Line within filter OR There is nothing to release.
In these special cases, I want the system to skip the Purchase Order and move to the next rather than erroring out. How can I accomplish this.
I tried putting the above code in IF statement, but that didnt work. I tried using GETLASTERRORTEXT function along with CLEARLASTERROR, but I didnt have much success either.
Answers
FD Consulting