28 August, 2011

Record Lock Trace v 2.0

I've updated the Lock Trace Utility for Dynamics GP with 2 new features.

The first enhancement will replace the standard "This batch is being edited by another user" prompt when attempting to post or delete a SOP Batch with the name of the user that has the batch locked with an activity record in SY00800.


The second enhancement will clear all records that are locked by users that are not actively logged in to GP.  This will be executed when attempting to access a transaction locked by a user that is not actively logged in.  After, the record will be available and the following prompt will be presented.


The basic delete statements executed by this feature are listed below:

delete tempdb.dbo.dex_lock where session_id not in (select SQLSESID from dynamics.dbo.activity)
delete tempdb.dbo.dex_session where session_id not in (select SQLSESID from dynamics.dbo.activity)
delete DYNAMICS.dbo.SY00800 where userid not in (select USERID from DYNAMICS.dbo.activity)

If you are not sure what version of the utility you have installed, since there isn't a GUI, I've updated the about message to include the version information.


Download Record Lock Trace for Dynamics GP here or view the product page for more information.  Please leave a comment if there are other features or transaction types that you would like added to this utility.

09 August, 2011

Reconciling SOP Batches from WITHIN Dynamics GP

An article I posted sometime ago with a SQL Script that would reconcile SOP Batch Totals has really developed legs recently.  It's been downloaded several times a week for several months.  As a result, I felt some enhancement was in order.

To that end, I've compiled the same logic, with few exceptions, into an assembly you can download here.  Copy this to your Addins folder and then you can perform this same function from the Sales Batch Entry Additional Menu without having to run a SQL script or access the Reconcile Receivable Amounts Window in GP.


One exception to the logic in the script is that this will not delete empty batches.  If you have an opinion as to how valuable that feature might be please leave a comment and I will evolve this accordingly.  This utility will simply do the following:
  1. Update batch totals for those that are NOT locked by a user with a Batch Activity Record (SY00800).  This was not designed to reconcile a specific batch but rather all batches at once.  So, don't select a batch in Sales Batch Entry when executing this routine unless you want the batch selected to be excluded from the logic.
  2. Create missing Batch Header records for batches that do exist in SOP WORK (SOP10100) but not SY00500.
This will be especially useful if you want to enable GP users to resolve SOP Batch Total discrepancies on their own without having to grant them access to the Reconcile Receivables Amounts window.

This was developed on GP 2010 and tested on both GP 2010 and GP 10.