How to override credit limit warning in Accpac ERP through your code

By | October 1, 2011

In our last blog we explained the code to control the posting on transaction screen. Taking this forward this blog will assist you in overriding the credit limit warning.
How to control the posting on transaction screens in Accpac ERP through your code
Credit limit warnings appear when total outstanding balance is greater than the specified credit limit. So when posting the sales order, if the order exceeds the credit limit, Order Entry displays a credit check form, and a user with the authorization has to override the limit before posting the transaction.
Now the question is how to programmatically handle this override scenario. Let say you have a custom program which does the bulk order import, and you do not want to interrupt the order posting with the credit limit warnings the below mention code snippet will assist you in overriding the credit check warning.

Script

Vw_OEORDH.Process
Vw_OEORDH.Fields(“OECOMMAND”).Value = “4”
Vw_OEORDH.Fields(“APPROVEBY”).Value = “ADMIN”
Vw_OEORDH.Fields(“OECOMMAND”).Value = “6”
Vw_OEORDH.Fields(“APPPASSWRD”).Value = “ADMIN”
Vw_OEORDH.Process
Vw_OEORDH.Insert

Ensure that you pass in appropriate user name and password in fields APPROVEBY and APPPASSWRD.