Automating AIT Account Master Check Links

< Back
You are here:

This document contains the steps required to run or schedule the AIT Account Master check links process outside of the normal Great Plains interface.  This applies only to systems that are using the MSSQL database option for Dynamics GP.  This process is not necessary if you are using AIT 9.0 or higher, as these versions use triggers on the GL Account Master to self-maintain the AIT Account Master (unless you use a process that disables or bypasses SQL triggers).

This process will help you create a SQL Job that you can schedule this process to run overnight or on weekends without user intervention, on a one-time or recurring schedule.  The job takes into account current system activity, so that it will not run if users are logged into the accounting system.  The job handles only basic SQL Job features, so it will not return any error code if it does not run to completion.  Please refer to SQL Server documentation if you want to add additional features, such as error logging, notifications, etc., or if you need more assistance with SQL Jobs.

1. Under the Server\Management\SQL Server Agent branch, select Jobs
2. Right-click on Jobs and select New Job…
3. Fill out the General with a Name and Description of your choice.
4. Click on the Steps option, and click New.
5. Fill out the New Job Step as follows, using the following code for the Command (you can copy and paste this into the Command window):

/* Declare variable to indicate any error */
declare @intResult int

/* Make sure there are no users logged into GP and then run the AIT stored procedure*/
select * from DYNAMICS.dbo.ACTIVITY
if @@rowcount = 0
exec itBuildITAccountMSTR @intResult

6. For the Database, choose ANY one company database.  DO NOT CHOOSE THE DYNAMICS DATABASE, or the procedure will fail. You do not need to create a job for more than one database, as the procedure will loop through all company databases.
7. Click OK
8. Click OK again.

You can now run or schedule the job as required for your accounting system by creating a new schedule under the Schedules section.