SQL Script to Set EFT Output Locations When Copying Live To Test

Microsoft Dynamics GPAs mentioned in the last post I’ve had a couple of scripts recently which I needed to create in order to facilitate clients easily making live to test copies without issues arising.

The script, below, can be used to set the EFT file locations in Checkbook Master. For the client I was working with, we only needed to set the file location of the Domestic Payments File Location field, but I am including all of the file location fields in the script.

Simply change the highlighted path locations to the required paths and set the Checkbook ID at the bottom:

/*
Created by Ian Grieve of azurecurve|Ramblings of a Dynamics GP Consultant (http://www.azurecurve.co.uk)
This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int).
*/
UPDATE
	CM00101
SET
	DomPmtsFile = '{path}'
	,ForeignPmtsFile = '{path}'
	,DomDirDbtCollectFile = '{path}'
	,DomDirDbtRefundFile = '{path}'
	,EFTPMPrenoteFile = '{path}'
	,EFTRMPrenoteFile = '{path}'
	,EFTCommunicationFile = '{path}'
WHERE
	CHEKBKID = '{chequebook id}'

As always with scripts, please make sure you have a good backup before using the script.

SQL Script To Update EFT Payment Register Report

Microsoft Dynamics GPPretty much every client we have of Microsoft Dynamics GP uses the EFT Payment Register Report; a number of the save the file instead of printing it as the report has been customised to generate the EFT payment file for upload to the bank.

The clients who do this are either those whose installations of Microsoft Dynamics GP predate version 10 when the EFT for Payables Management module was made available to the UK market or they implemented before the EFT File Format was enhanced to allow a CSV output.

While some clients have created or amended a file format since the above, not all of them have been willing to spend the time (or money) to make the change.

As such, when they copy live to test they need to amend the path to which the report is being output, to ensure that a live file is not accidentally overwritten.

To faciliate this for users who have automated the live to test restore I created a script they could build into the process:

/*
Created by Ian Grieve of azurecurve|Ramblings of a Dynamics GP Consultant (http://www.azurecurve.co.uk)
This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int).
*/
UPDATE
	SY02200
SET
	FILEXPNM = 'C:\BACS OUTPUT\BACS.TXT'
WHERE
	PTGRPTNM = 'EFT Payment Register'

The highlighted section is the path name which needs to be changed depending on where the test file is to be output.