Fix Windows 10 Lock Screen Not Changing

WindowsI have my PCs all set to share settings via OneDrive; I like this as it means I have a unifed theme everywhere, but when a problem occurs, it occurs everywhere.

his particular issue, is that I use Windows Spotlight for images on the lock screen and it became stuck on one image a while ago. After recently installing a new PC and having them same problem there as on other machines, I finally decided to fix the issue.

This was a fairly straightforward fix for me, but others report various fixes not working.

I found the fix which worked for me on Driver Easy and am reposting here, so I can easily find it again in future if necessary.

To fix the issue by re-registering Windows Spotlight, perform the following steps:

Use Run As Administrator to launch Command Prompt, click Yes when prompted by UAC (User Account Control) and type the following command:

dism /online /cleanup-image /restorehealth

Press Enter and wait for the command to run; this might take a few minutes to complete:

Command Prompt: dism /online /cleanup-image /restorehealthdism /online /cleanup-image /restorehealth

In the Command Prompt window type the following:

sfc /scannow

Hit enter and wait for the command to complete:

Command Prompt: sfc /scannowsfc /scannow

Either type powershell or launch a PowerShell window and type the following:

Get-AppXPackage -AllUsers |Where-Object {$_.InstallLocation -like “*SystemApps*”} | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”}

Hit enter and wait for the PowerShell command to finish (this may take a while) and generate several errors which can be ignored:

PowerShellGet-AppXPackage -AllUsers |Where-Object {$_.InstallLocation -like “*SystemApps*”} | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register “$($_.InstallLocation)\AppXManifest.xml”}

I’ve found I need to wait a few minutes for the fix to take effect, but I don;t need to do anything else before the Windows Spotlight image starts to change.

Error Configuring Web Services for Microsoft Dynamics GP 2018

Microsoft Dynamics GPI’ve seen this error at two different clients now when configuring Web Services for Microsoft Dynamics GP 2018:

A loader exception has occurred.
Loader Errors:
- System.Data.SqlClient.SqlException (0x80131904): There is already an object named 'taRequesterWSDynamicsOnlineConfiguration1' in the database.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.Dynamics.InstallData.SqlObjectLoader.DoSqlFromResource(String resourceName)
   at Microsoft.Dynamics.GP.GPSystemWebServiceObjectLoader.PerformActionOnEConnectStoredProcedures(Action action)
   at Microsoft.Dynamics.InstallData.Loader.Process(String[] args)
Error Number:2714,State:3,Class:16

Both clients have previously had the Web Services implemented so that they could use Email Actions for Workflow approval. The first client got the error while we were doing the initial installation and confguration of the Web Services for Microsoft Dynamics GP 2018 and the second got them when we did a redeploy of the Web Services on the test system after refreshing the databases, but hadn;t received the error during the initial installation and configuration.

Continue reading “Error Configuring Web Services for Microsoft Dynamics GP 2018”

Microsoft Dynamics GP 2013 R2 Out of Mainstream Support

Microsoft Dynamics GPMicrosoft Dynamics GP 2013 came out of mainstream support and into extended support as of 1oth April 2018; end of mainstream support means you will no longer get statutory updates such as the addition of the Invoice Receipt Date in the January 2017 hotfix which applied to the UK or year-end tax updates for the US and Canada.

I always recommend to client to look to upgrade every two to three years; the last few years have seen many improvements and additional new functionality added to Microsoft Dynamics GP (2013, 2013 R2, 2015, 2015 R2, 2016, 2016 R2 and 2018) as well as bug fixes.

By not upgrading regularly, you not only miss out on all of these fixes and new functionality, but you also make your eventual upgrade longer and more complex due to the number of versions which need to be upgraded through.

You can review the product lifecycle on the Microsoft Lifecycle Policy – Microsoft Dynamics GP page.

How to Schedule a Skype for Business Meeting

Microsoft Dynamics GPI’m posting this because it took me far longer to work out how to schedule a Skype for Business meeting than it should have done.

The reason it took so long to find out how to do this, was because I was looking in Skype for Business itself. I should have been looking in Outlook:

Continue reading “How to Schedule a Skype for Business Meeting”

Doc Attach Button in Notes Window Missing

Microsoft Dynamics GPAfter a clients system was upgraded a while ago from Microsoft Dynamics GP 2010 SP3 to Microsoft Dynamics GP 2018, we enabled the Document Attachment feature for the client to use. Unfortunately when showing the client how to use the feaute, we found that the Doc Attach button was missing (the red square is where the button should be):


Continue reading “Doc Attach Button in Notes Window Missing”

Debugging Integration Manager Crashes

Microsoft Dynamics GPWe’ve had two separate clients recently log calls where Integration Manager was crashing while performing an integration.

The first client was doing an Inventory Items integration on Microsoft Dynamics GP 2015 R2 and the other was doing a Sales Transaction integration on Microsoft Dynamics GP 2016 R2.

Both of the integrations had been running fine for quite a long period of time before starting to crash; no changes had been made to either system and I’ve not been able to determine why Integration Manager (IM) has started crashing.

However, by the use of two ini file switches, we were able to determine what error was being encountered by IM resulted in a crash.

The two switches are already present in the ini file (C:\Program Files (x86)\Microsoft Dynamics\Integration Manager nn/Microsoft.Dynamics.GP.IntegrationManager.ini by default) whre the False value needs to be changed to True:


When these switches are set to True, the Microsoft Dynamics GP windows are not hidden when the integration runs.

We found that for the Inventory Items integration, accounts either didn’t exist, didn’t allow account entry or were inactive; for the Sales Transaction integration, Analytical Accounting (AA) had been enabled for one of the accounts and the integration didn’t handle AA.

I created a VB script for the Inventory Items integration to check the accounts in the Before Document script and cancel the document if the account was going to be a problem.

Access Windows Settings App Using ms-settings URIs

WindowsWindows 10 saw the introduction of a enw Settings app, which has been improved in every major update. The Settings app is a replacement for the old Control Panel, the applets of which could be accessed from either the command line or from the Run dialog.

The Settings app also allows you to directly open individual settings pages by using a URI. The list of URI’s below is for Windows 10 “Creators Update” (version 1704).

Not all dettings pages will be available in every SKU of Windows 10. The notes column details any additional requirements that must be met for a page to be available.

Continue reading “Access Windows Settings App Using ms-settings URIs”

Update Taxes In Fabrikam Sample Company to Add Current UK VAT Rates

Microsoft Dynamics GPWhile the Fabrikam sample company is very US-centric, it is still somewhat useful to use as it has data spread across lots of different modules. The sample data hasn’t been updated for years and so still has the UK VAT rate set at 17.5%; VAT was raised to 20% in the 2010 budget and came into force in January 2011.

I created a script a while ago which could be used to create VAT rates for use in both Purchasing and Sales.

In Sales only a Standard 20% rate is created, but for purchasing rates are created for the Standard 20%, reduced 5%, Exempt and Zero Rated.

Created by Ian Grieve of azurecurve|Ramblings of a Dynamics GP Consultant (
This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales (CC BY-NC-SA 2.0 UK).
-- Sales/Purchases Tax Schedule Header Master (TX00101)
	-- Purchasing
	('UKVATP','UK VAT All Purchasing',0)
	,('UKVATPS','UK VAT Purchasing Standard',0)
	,('UKVATPR','UK VAT Purchasing Reduced',0)
	,('UKVATPE','UK VAT Purchasing Exempt',0)
	,('UKVATPZ','UK VAT Purchasing Zero Exempt',0)
	-- Sales
	,('UKVATS','UK VAT All Sales',0)
	,('UKVATSS','UK VAT Sales Standard',0)

-- Sales/Purchases Tax Schedule Master (TX00102)
	-- Purchasing

--Sales/Purchases Tax Master (TX00201)
	-- Purchasing
	('UKVATPS','UK VAT Purchasing Standard',2,90,'',3,20.00000,0,1,'',0,0,0,0,1,1,0,0,'',0,'',0,'','','','','','','','','','','','','','','',0,0,1,0x00000000,0,0)
	,('UKVATPR','UK VAT Purchasing Reduced',2,90,'',3,5.00000,0,1,'',0,0,0,0,1,1,0,0,'',0,'',0,'','','','','','','','','','','','','','','',0,0,1,0x00000000,0,0)
	,('UKVATPE','UK VAT Purchasing Exempt',2,90,'',3,0.00000,0,1,'',0,0,0,0,1,1,0,0,'',0,'',0,'','','','','','','','','','','','','','','',0,0,1,0x00000000,0,0)
	,('UKVATPZ','UK VAT Purchasing Zero',2,90,'',3,0.00000,0,1,'',0,0,0,0,1,1,0,0,'',0,'',0,'','','','','','','','','','','','','','','',0,0,1,0x00000000,0,0)
	-- Sales
	,('UKVATSS','UK VAT Sales Standard',1,89,'',3,20.00000,0,1,'',0,0,0,0,1,1,0,0,'',0,'',0,'','','','','','','','','','','','','','','',0,0,1,0x00000000,0,0)

--Sales/Purchases Tax Summary Master (TX00202)
	-- Purchases
	-- Sales

This script has only ever been tested in the Fabrikam sample company; the script will need to be run again any time you redeploy the sample company using GP Utilities.

SQL Script to Alter Server and Database Views After Copying Live To Test

Microsoft Dynamics GPMicrosoft Dynamics GP includes a number of views in the database which are used to drive some of the reporting (such as the Refreshable Excel Reports); these reports contain drill down links. I’ve never really done that much work with the views myself, but I was alerted to an issue by a partner organisation who was creating some reports from Dynamics GP integrated with data from their system.

As development was in progress, the partner was working on the clients standalone test system, but when they tested the drill downs, the data was coming from the live system. I did some exploring of the views and found that the drilldowns are coded during deployment to include the server and database:

'Account Index For Drillback' = 'dgpp://DGPB/?Db=GP&Srv=2018SQL1\GP&Cmp=TEST&Prod=0' +dbo.dgppAccountIndex(1,['Account Master'].[ACTINDX] )

This issue will affect the views not only when the databases are copied to a new system, but also when a live company is copied to a test company on the same server.

The solution was to create a script which would alter the views to the new server or database:

Created by Ian Grieve of azurecurve|Ramblings of a Dynamics GP Consultant (
This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int).

DECLARE @ViewDefinition AS NVARCHAR(max)


DECLARE @NewServer AS VARCHAR(50) WHERE @@ServerName

CREATE TABLE #ViewDefinitions(
	ViewDefinition NVARCHAR(MAX)

INSERT INTO #ViewDefinitions
			REPLACE(['SQL Modules'].definition, 'CREATE VIEW', 'ALTER VIEW')
		,'Srv=' + @OldServer + '&Cmp=' + @OldDatabase,'Srv=' + @NewServer + '&Cmp=' + @NewDatabase)
		sys.all_views AS ['All Views']
		sys.sql_modules AS ['SQL Modules']
				['SQL Modules'].object_id WHERE ['All Views'].object_id
		['SQL Modules'].definition LIKE '%Srv=' + @OldServer + '&Cmp=' + @OldDatabase + '%')

	cursor_Views Cursor
	Open cursor_Views

		IF (@@FETCH_STATUS <> -2)
			EXEC (@ViewDefinition)
	CLOSE cursor_Views
DEALLOCATE cursor_Views

DROP TABLE #ViewDefinitions

The script uses the @@ServerName and DB_Name functions for the new server and database names; the two highlighted sections are the parameters for the old server and database which need to be amended.

As this script updates the views, make sure you have a good database backup before running.

Logical File Name SQL Scripts: SQL Script to Create Restore Scripts for all Dynamics Databases

Microsoft SQL ServerSince the release of Microsoft Dynamics GP 2018, on the 1st December 2018, we have been busy with a few upgrade projects for clients. Our standard recommendation is to have a standalone test system for performing UAT and this means backing up and restoring databases.

While the backups are easy to do, the restores can be trickier when one database has been restored into another, as this means the logical file name will not match the physical one.

This isn’t an issue when the client has only a handful of databases, but when there are 30 or even a hundred, it becomes much more of an issue. However, you can select database details in SQL Server from the sys.master_files single, system-wide view.

This script creates restore scripts for all Dynamics GP databases and will use the correct logical filename whether it matches the . The script is configured with the assumption that the system database is called DYNAMICS; if you are using a named system database, change the highlighted section:

Created by Ian Grieve of azurecurve|Ramblings of a Dynamics GP Consultant (
This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int).

DECLARE @BackupLocation VARCHAR(300) = 'I:\Live Upgrade\2016R2\'
DECLARE @DateParameter VARCHAR(10) = FORMAT(GETDATE(), 'yyyy-MM-dd')
	USE master
	DISK = N''' + @BackupLocation + DB_NAME() + '_' + @DateParameter + '.bak'' WITH  FILE = 1,  
	MOVE N''' + ['databases-data'].name + ''' TO N''' + @DataLocation + RIGHT(['databases-data'].physical_name, CHARINDEX('\', REVERSE(['databases-data'].physical_name)) - 1) + ''',  
	MOVE N''' + ['databases-log'].name + ''' TO N''' + @LogLocation + RIGHT(['databases-log'].physical_name, CHARINDEX('\', REVERSE(['databases-log'].physical_name)) - 1) + ''',  NOUNLOAD,  STATS = 5
	sys.master_files ON ['databases-data']
	sys.master_files ON ['databases-log']
			DB_NAME(['databases-log'].database_id) = DB_NAME(['databases-data'].database_id)
	DB_NAME(['databases-data'].database_id) = DB_NAME()

SELECT @SQLStatement = @SQLStatement + 
	'RESTORE DATABASE ' + RTRIM(['Company Master'].INTERID) + ' FROM  
	DISK = N''' + @BackupLocation + RTRIM(['Company Master'].INTERID) + '_' + @DateParameter + '.bak'' WITH  FILE = 1,  
	MOVE N''' + ['databases-data'].name + ''' TO N''' + @DataLocation + RIGHT(['databases-data'].physical_name, CHARINDEX('\', REVERSE(['databases-data'].physical_name)) - 1) + ''',  
	MOVE N''' + ['databases-log'].name + ''' TO N''' + @LogLocation + RIGHT(['databases-log'].physical_name, CHARINDEX('\', REVERSE(['databases-log'].physical_name)) - 1) + ''',  NOUNLOAD,  STATS = 5
	SY01500 AS ['Company Master']
	sys.master_files ON ['databases-data']
			DB_NAME(['databases-data'].database_id) = ['Company Master'].INTERID AND ['databases-data'].name LIKE '%mdf'
	sys.master_files ON ['databases-log']
			DB_NAME(['databases-log'].database_id) = ['Company Master'].INTERID AND ['databases-log'].name LIKE '%ldf'
	['databases-data'].name NOT LIKE '%<TEST>'
	['Company Master'].CMPANYID > 0
	['Company Master'].INTERID

SELECT @SQLStatement