Find All Microsoft Dynamics GP Companies With Web Services Enabled

Microsoft Dynamics GPI’ve recently been doing some work with a client which necessitated the backup of all databases using the Web Services for Microsoft Dynamics GP. The easiest way to determine which databases had the web services enabled, was to run a script checking the Workflow Setup (WF00100) table.

I took a copy of my return functional currency for all companies script and amended it to look at the web services.

If the web services has never been enabled, a company won’t be returned at all other wise a 1 for active or 0 for inactive will be returned.

/*
Created by Ian Grieve of azurecurve | Ramblings of an IT Professional (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). */
CREATE TABLE #Workflow( INTERID VARCHAR(5) ,CMPNYNAM VARCHAR(200) ,WEBSERVICESACTIVE VARCHAR(20) ) GO DECLARE @SQL NVARCHAR(MAX) SELECT @SQL = STUFF(( SELECT CHAR(13) + 'SELECT ''' + INTERID + ''' ,''' + CMPNYNAM + ''' ,EnableWFNotifService FROM ' + INTERID + '.dbo.WF00100' FROM DYNAMICS.dbo.SY01500 FOR XML PATH(''), TYPE).value('.', 'NVARCHAR(MAX)'), 1, 1, '') INSERT INTO #Workflow EXEC sys.sp_executesql @SQL GO SELECT * FROM #Workflow ORDER BY INTERID GO DROP TABLE #Workflow GO

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.

Leave a Reply

Your email address will not be published. Required fields are marked *