Sign Up Now! Log In
Joel 10/12/2011 9:39:58 AM

VBA Mod - Disable the post button in the GL Batches window

* This article, and all our great VBA documentation, Is available on the VBA/Modifier menu
This article describes the code needed to create a VBA mod in GP 10 to keep a user from posting a General Ledger batch if that user is the one that created the batch.

We take several steps to accomplish this. The first step is a SQL trigger that records the user id in the SY00500 table. Dynamics does not correctly record the user, so we fix that.

Second, we trap the Origin_Changed and BatchID_Changed events and we look up the batch in SY00500. Based on the userID there, we enable/disable the post button on the form.

Version: GP 10,GP 2010
Section: VBA