Using No-IP For External Access With a Dynamics IP Address: Series Index

Useful ApplicationsI do a lot of travelling for work and often want to connect to my home system to access a NAS or a computer which has been left on. Unfortunately, I have a dynamic IP address which means the IP address changes whenever the router restarts and, living in rural England, glitches which cause a router restart are not uncommon.

The solution to this is to use No-IP; a service I will introduce over the next few posts starting with what it is and how it works trough to setting it up and installing the update client.

The series index (below) will automatically update as each post goes live over the next few days, unless you’re reading it via a syndicated feed, in which case check Using No-IP For External Access With a Dynamics IP Address for the new posts.

Using No-IP For External Access With a Dynamics IP Address
What Is No-IP?
Creating An Account
Installing No-IP Client

Finding Missing Security Privileges Encountered When Starting Microsoft Dynamics GP

Microsoft Dynamics GPI’ve been doing work with a client recently to refrsh their security in Microsoft Dynamics GP. We used the Microsoft Dynamics GP Security Matrixc from Fastpath to get the core security tasks assigned to the relevant roles. However, after security roles were created and testing was done, one user role was received errors when logging into Microsoft Dynamics GP:

Microsoft Dynamics GP seurity error

You don't have security privileges to open this window. Contact your system administrator for assistance.

Continue reading “Finding Missing Security Privileges Encountered When Starting Microsoft Dynamics GP”

Jet Service Tier Windows Service Won’t Start

Jet ReportsI’ve been doing some work with a client recently to implement Jet Reports. We installed the Jet Service Tier to allow the management of data sources in a central repository. However, after installation we were unable to start the service and received an error each time:

Error 1067: The process terminated unexpectedly.

After doing some investigation, we found that what wasn’t being reported to us on the server was that there was part of the installation (which was executing some PowerShell) caught by a malware monitoring application, called Apex One, and blocked. We had an exception added for powershell.exe and were then able to install the Jet Service Tier again, after which the service was successfully started automatically.

Format XML

Useful WebsitesI posted a link to a website which will format your SQL code a while back and recently found myself looking for a way of formatting XML code to make it more readable.

One of the clients I was working with, had an integration sending data to eConnect to load into Microsoft Dynamics GP, and the XML was coming across as one long string and I needed to make it readable by breaking it over multiple lines. A quick search found me Free Online XML Formatter from freeformatter.com which includes a number of other tools which look useful for formatting/minifying/validating and so on.

Free Online XML Formatter - freeformater.com

SQL View Showing Serial Number Allocated to SOP from POP in Microsoft Dynamics GP

Microsoft Dynamics GPA recent project required a report of serial numbers received into Microsoft Dynamics GP on purchase orders and to which sales transaction they’d been allocated. I had a hunt around in my scripts folder and found an old script I’d written which only required some small changes to add the required fields.

The script uses INNER JOIN clauses as only assigned serial numbers were wanted, but this could easily be changed to LEFT JOIN to return serial numbered items which had been received but not yet allocated.

-- drop view if it exists
IF OBJECT_ID(N'uv_AZRCRV_POPSOPSerialNumbers', N'V') IS NOT NULL
	DROP VIEW uv_AZRCRV_POPSOPSerialNumbers
GO
-- create view
CREATE VIEW uv_AZRCRV_POPSOPSerialNumbers AS
SELECT
	['Purchasing Receipt Line Quantities'].PONUMBER
	,['Purchasing Receipt Line Quantities'].POPRCTNM
	,['Purchasing Receipt Line Quantities'].VENDORID
	,['Purchasing Receipt Line Quantities'].TRXLOCTN
	,['Sales Serial/Lot Work AND History'].ITEMNMBR
	,[Purchasing Serial Lot History'].SERLTNUM
	,['Sales Serial/Lot Work AND History'].SOPTYPE
	,CASE ['Sales Serial/Lot Work AND History'].SOPTYPE
		WHEN 1 THEN 'Quote'
		WHEN 2 THEN 'Order'
		WHEN 3 THEN 'Invoice'
		WHEN 5 THEN 'Back Order'
		ELSE ''
	END AS 'Type'
	,['Sales Serial/Lot Work AND History'].SOPNUMBE
	,['Sales Transactions'].DOCDATE
	,['Sales Transactions'].CUSTNMBR
FROM
	POP30330 AS [Purchasing Serial Lot History'] -- Purchasing Serial Lot History (POP30330)
INNER JOIN
	POP10500 AS ['Purchasing Receipt Line Quantities'] -- Purchasing Receipt Line Quantities (POP10500)
		ON
			['Purchasing Receipt Line Quantities'].POPRCTNM = [Purchasing Serial Lot History'].POPRCTNM
		AND
			['Purchasing Receipt Line Quantities'].RCPTLNNM = [Purchasing Serial Lot History'].RCPTLNNM
INNER JOIN
	SOP10201 AS ['Sales Serial/Lot Work AND History'] -- Sales Serial/Lot Work and History (SOP10201)
		ON
			['Sales Serial/Lot Work AND History'].SERLTNUM = [Purchasing Serial Lot History'].SERLTNUM
INNER JOIN
	(
		SELECT
			SOPNUMBE
			,SOPTYPE
			,DOCID
			,DOCDATE
			,CUSTNMBR
			,CUSTNAME
		FROM
			SOP10100 AS ['Sales Transaction Work'] -- Sales Transaction Work (SOP10100)
		UNION ALL
			SELECT
				SOPNUMBE
				,SOPTYPE
				,DOCID
				,DOCDATE
				,CUSTNMBR
				,CUSTNAME
			FROM
				SOP30200 AS ['Sales Transaction History'] -- Sales Transaction History (SOP30200)
	) AS ['Sales Transactions']
		ON
			['Sales Transactions'].SOPNUMBE = ['Sales Serial/Lot Work AND History'].SOPNUMBE
		AND
			['Sales Transactions'].SOPTYPE = ['Sales Serial/Lot Work AND History'].SOPTYPE
GO

GRANT SELECT ON uv_AZRCRV_POPSOPSerialNumbers TO DYNGRP
GO

SQL View to Return the Last Restore Date of Microsoft SQL Server Databases

Microsoft SQL ServerThis script will create a SQL view to select the last restore date for every database on a Microsoft SQL Server along with the user who performed the restore.

It has included a couple of other use columns in the returned data such as the collation_name and compatibility_level:

-- drop view if it exists
IF OBJECT_ID(N'uv_AZRCRV_GetLastDatabaseRestoreDate', N'V') IS NOT NULL
	DROP VIEW uv_AZRCRV_GetLastDatabaseRestoreDate
GO
-- create view
CREATE VIEW uv_AZRCRV_GetLastDatabaseRestoreDate AS
WITH LastRestores AS
	(
		SELECT
			d.name AS DatabaseName
			,d.create_date
			,d.compatibility_level
			,d.collation_name
			,r.restore_date
			,r.user_name
			,ROW_NUMBER() OVER (PARTITION BY d.Name ORDER BY r.[restore_date] DESC) AS RowNumber
		FROM
			master.sys.databases AS d
		LEFT JOIN
			msdb.dbo.[restorehistory] AS r
				ON
					r.[destination_database_name] = d.Name
	)

SELECT
	DatabaseName
	,create_date
	,compatibility_level
	,collation_name
	,restore_date
	,user_name
FROM
	LastRestores
WHERE
	RowNumber = 1
GO

GRANT SELECT ON uv_AZRCRV_GetLastDatabaseRestoreDate TO DYNGRP
GO

I created this as a view so that it could easily be included in a SmartList using either SmartList Designer or SmartList Builder to allow finance users to see how up-to-date their test system is.

SQL Script to Get Assigned Building Block Groups for Companies in Management Reporter

Microsoft Dynamics GPI recently did a Microsoft Dynamics GP and Management reporter upgrade for a client which incuded migrating the databases to a new server. After performing the upgrade, users were unable, in some companies, to see the reports in Management Reporter. When we looked into it, some of the companies had reverted to the Default building block group.

To easily identify the companies which had reverted, I created the below script which coud be rn on both the original and upgraded Management reporter databases; it lists all the companies and the assigned building block group:

/*
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). */
SELECT ['Case Control'].Code AS 'Company ID' ,['Case Control'].Name AS 'Company Name' ,['Control Specification Set'].Name AS 'Building Block ID' ,['Control Specification Set'].Description AS 'Building Block Name' FROM Reporting.ControlCompany AS ['Case Control'] INNER JOIN Reporting.ControlSpecificationSet AS ['Control Specification Set'] ON ['Control Specification Set'].ID = ['Case Control'].SpecificationSetID ORDER BY ['Case Control'].Code

SQL script to insert emails into Microsoft Dynamics GP

Microsoft Dynamics GPThis is a script I wrote years ago and thought I’d posted it here, but it seems it had never been posted, although I have posted a script to insert test emails against all customers. This script can be used to insert or update email addresses on vendors, customers or items in Microsoft Dynamics GP.

The insert doesn’t validate against the records against which the email addresses will be connected, so care does need to be taken to ensure data integrity and the script should be tested first before being run on a live company.

/*
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 #SY01200_IMPORT ( Master_Type VARCHAR(3) -- VEN = Vendor / CUS = Customer / ITM = Item ,Master_ID VARCHAR(100) ,ADRSCODE VARCHAR(100) ,EmailToAddress VARCHAR(1000) ,EmailCcAddress VARCHAR(1000) ,EmailBccAddress VARCHAR(1000) ) GO BULK INSERT #SY01200_IMPORT FROM 'c:\temp\email.txt' WITH (FIELDTERMINATOR = '\t' ,ROWTERMINATOR = '\n' ,FIRSTROW = 2 ) GO -- UPDATE if Email Details present UPDATE SY SET SY.EmailToAddress = SY_I.EmailToAddress ,SY.EmailCcAddress = SY_I.EmailCcAddress ,SY.EmailBccAddress = SY_I.EmailBccAddress FROM SY01200 SY INNER JOIN #SY01200_IMPORT AS SY_I ON SY_I.Master_ID = SY.Master_ID AND SY.Master_Type = SY_I.Master_Type AND SY.ADRSCODE = SY_I.ADRSCODE GO -- Insert if no Email Details INSERT INTO SY01200 ( Master_Type ,Master_ID ,ADRSCODE ,EmailToAddress ,EmailCcAddress ,EmailBccAddress ) ( SELECT Master_Type ,Master_ID ,ADRSCODE ,EmailToAddress ,EmailCcAddress ,EmailBccAddress FROM #SY01200_IMPORT WHERE (SELECT COUNT(Master_ID) FROM SY01200 WHERE Master_Type = #SY01200_IMPORT.Master_Type AND Master_ID = #SY01200_IMPORT.Master_ID AND ADRSCODE = #SY01200_IMPORT.ADRSCODE) = 0 ) GO DROP TABLE #SY01200_IMPORT GO

Upcoming Microsoft Dynamics GP Webinars from ISC Software

ISC Software SolutionsEvery month at ISC Software I present a webinar on Microsoft Dynamics GP and related products. We typically have the next three upcoming monthly webinars I’ll be delivering scheduled.

We run these webinars on a monthly basis, with occasional extra webinars added to the schedule so it is worth checking the Webinar Schedule page every so often.

The upcoming webinars are:

Automation in Dynamics GP
In February is Automation in Dynamics GP; discover how to improve efficiencies in Microsoft Dynamics GP through the use of automation.

Tue, February 16th, 2021 4:00 PM – 4:45 PM BST

Register Here

Controls and Security in Microsoft Dynamics GP
In March is Controls and Security in Microsoft Dynamics GP; see how to improve controls and security in Dynamics GP using a mix of standard and third party functionality..

Tue, March 16th, 2021 4:00 PM – 4:45 PM BST

Register Here

Powerful Document Generation for Dynamics GP
In April is Powerful Document Generation for Dynamics GP; watch in this webinar with a live dox42 demo and we will show you how to design attractive document templates in MS Office and integrate data from MS Dynamics GP and many other data sources such as Microsoft 365, SharePoint or SAP.

Tue, April 20th, 2021 4:00 PM – 4:45 PM BST

Register Here

Error Upgrading to Microsoft Dynamics GP Fall 2020 Release

Microsoft Dynamics GPAs I mentioned in my last post, I’m in the process of doing upgrades for a couple of clients to the Dynamics GP Fall 2020 Release. Before I started on a clients system, I thought I would upgrade my own demo/test system to the latest version. The upgrade started fine, but then in one of the companies, the upgrade crashed with two errors:

First error message

Microsoft Dynamics GP Utilities

The stored procedure SynchronizeTableData() of form duSQLAccountSynch : 27Pass Through SQL returned the following results: DBMS: 2601, Microsoft Dynamics GP: 0.

Second error message

Microsoft Dynamics GP Utilities

Microsoft Dynamics GP Utilities install/upgrade failed.

Needing some more information on the error, I enabled a Dex SQL log and ran the upgrade again.

The problem it identified was in the Workflow Template Fields (WF40202) table into which I had added some extra rows for the fields to be included on the Workflow notification emails.

Once I removed these fields, I was able to run the upgrade without further problems; after the upgrade was complete, I ran the script to recreate the rows.