I am trying to Autoprint from Payment Entry Screen.
I have created a datadirective on Checkhed
The condition is as soon as the payment is posted it should autoprint.
At first glance, it seems that the ttCheckHedRow table no longer contains the GroupID value - and that would tell me that you are triggering at the wrong time in the process.
Processing AP invoice form suppliers through Epicor typically follows the path of
AP Invoice creation
AP Edit List - generate and review
AP Invoice Posting
Generate Payments
Payment Edit List - generate and review
Process Payments (this prints the checks or generates the payment file)
(optional) Re-Process Payments
Post Payments
If you are trying to do it after Posting, then the tables are empty as all of the data has been moved to the APTran tables.
The issue is that Epicor looks at the table Erp.APChkGrp to validate that your Group is valid, once you post the Payment (Group) Epicor deletes your rows from Erp.APChkGrp and hence it is no longer found.
Once your AutoPrint runs in the Standard Directive, it is too late.
Your best option is to recreate the APCheck as a BAQ Report and invoke that instead.
I dont like Auto Printing Checks, If you do it as part of posting and the Printer Jams, or in your case PDF Reader hiccups, know there is no way to re-print it, you must void all checks and do it over, unless you store it by increasing the Archive Period. That is why its crucial to print them, make sure they are printed before ever posting.
Odd part is that Epicor is trying to regenerate or generate the Checks again. Which is a bit odd because I dont think you can post without ever already generating checks and your ReStartProcessPayments is False. Are you guys invoking the Posting from API instead of UI (hence the ability of circumvention)?
The error you receive is coming from the Internal Process of ProcessPayment when it tries to decide if it should generate numbers.
If you are invoking the posting from an API then simply Run the Report there and then post.