Update Setup Mistake On Inventory User Categories

Microsoft Dynamics GPWe implemented Microsoft Dynamics GP for a client a while ago; they are quite heavy users of the Inventory Control module.

Unfortunately, when they configured the User Categories in Inventory Control Setup (Inventory » Setup » Inventory Control) the description for the category was entered in the Image field instead of the Description field.

Rather than making them go through and manually change all of the categories that had been defined, I put together a small script to do the job.

The script checks if the length of the entry in the Image field is greater than zero and that the Description has not been set before doing the update.

UPDATE
	IV40600
SET
	UserCatLongDescr = Image_URL
	,Image_URL = ''
WHERE
	LEN(RTRIM(Image_URL)) > 0
 AND 
	LEN(RTRIM(UserCatLongDescr)) = 0
GO

As I was writing this script we encountered the same setup issue on a client installation we took over from another partner so this looks like it may be more common that I thought it would be; caused I think be the fact the window has the Image field visible by default and not the Description which people expect.