SQL Script to Update Web Services Server in Workflow Setup When Copying Live To Test

Microsoft Dynamics GPAll clients will at some point copy their live company into a test one, whether or not the test system is on the same server or a different one. If on the same machine, they will usually use an automated process to perform the backup and restore.

There is usually other tasks which will need to be undertaken such as changing the output location of the EFT Payment Register Report or prefixing email message subjects with “TEST” or setting all email addresses to internal ones.

I’ve recently encountered a couple more fields which need to be reset to avoid problems when copying live to test. The one prompting this script, was when the live company was copied to the standalone test system, the Web Services server needed to be changed to a different value:

/*
Created by Ian Grieve of azurecurve|Ramblings of a Dynamics GP Consultant (https://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 WF00100
	SET
		Web_Service_Server = '{servername}'
WHERE
	SETUPKEY = 0
GO

The highlighted section, above, needs to be changed to your Web Services server.

In addition, a repair needed to be run using the Web Services Configuration Wizard, but at least the script removes one manual step.

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

What should we write about next?

If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.

Your Name

Your Email

Suggested Topic

Suggestion Details

Looking for support or consultancy with Microsoft Dynamics GP?

I no longer work with Microsoft Dynamics GP, but the last company I worked for was ISC Software in the UK; if you’re looking for support or consultancy services with Microsoft Dynamics GP you can contact them here.