How to control the posting on transaction screens in Accpac ERP through your code
Normally if you click on POST button of any transaction screen it will fire all the standard validations of Accpac and if all the validations PASS it will post the transaction, however if any of the validations fail then Accpac will pop up a error message and won’t post the document.
This is standard behavior, but we often get requirements from end user to add custom validations over and above Accpac’s standard validations, Say for instance; someone may require PO Number as a mandatory field in Order Entry Screen which should be entered by user before posting the document.
Adding validation is not a big deal, where people often get stuck is “How do I control the Posting routine of Accpac so that if My validation fails Accpac Does not Post the document?”
It looks like a challenge until you discover the method to do it, but once you know it, it’s as simple as setting a variables value. Just to save your time here is how to do it
On AccpacOE1100UICtrl1_OnUIAppOpened event first set the data source.
Then on data source change event put your verifications.
condition could be a variable coming from your validation if it’s true that means your validation passed if it’s false that means it failed.
As you can see from the above snippet “Pstatus” is a parameter and posting can be controlled through it. In order to restrict the posting set Pstatus = Status_Cancel and to continue the posting set it to Status_OK.
Hope this helps.
Blog Archives
- May 2012 (8)
- April 2012 (4)
- March 2012 (2)
- February 2012 (2)
- January 2012 (1)
- October 2011 (3)
- September 2011 (2)
- August 2011 (9)
- July 2011 (5)
- June 2011 (6)
- May 2011 (10)
- April 2011 (7)
Tags
bulk order import Button Collation Commission credit limit Crystal custom program database Day End Document Numbering error Form Import Integration inventory control Invoice Label logon Manual Entry order entry outstanding periods POS Posting posting messages processing quantity recurring Rent Report Reports scheduling Shipment Shopper SQL stock SWT Tally TDS Transaction transactions Validations Views warning warnings




