I’ve written a few scripts to update data in the Fabrikam sample company (I will be posting a series index to link them all together in the near future).
The sample company ships with a few budgets preloaded, but they are not named very well. For example, the budget for 2027 (the year in which Fabrikam is operating) is named BUDGET 4 and the budget for 2025 is named BUDGET 2005.
/*
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 2.0 UK: England & Wales (CC BY-NC-SA 2.0 UK).
*/
-- UPDATE Budget Master (GL00200)
UPDATE
GL00200
SET
BUDGETID = 'MASTER 2024'
,BUDCOMNT = 'MASTER 2024'
WHERE
BUDGETID = 'BUDGET1'
GO
UPDATE
GL00200
SET
BUDGETID = 'FORECAST 2024'
,BUDCOMNT = 'FORECAST 2024'
WHERE
BUDGETID = 'BUDGET2'
GO
UPDATE
GL00200
SET
BUDGETID = 'REFORECAST 2024'
,BUDCOMNT = 'REFORECAST 2024'
WHERE
BUDGETID = 'BUDGET3'
GO
UPDATE
GL00200
SET
BUDGETID = 'MASTER 2025'
,BUDCOMNT = 'MASTER 2025'
WHERE
BUDGETID = 'BUDGET 2005'
GO
UPDATE
GL00200
SET
BUDGETID = 'MASTER 2026'
,BUDCOMNT = 'MASTER 2026'
WHERE
BUDGETID = 'BUDGET 2006'
GO
UPDATE
GL00200
SET
BUDGETID = 'FORECAST 2027'
,BUDCOMNT = 'FORECAST 2027'
WHERE
BUDGETID = 'BUDGET 4'
GO
UPDATE
GL00200
SET
BUDGETID = 'MASTER 2028'
,BUDCOMNT = 'MASTER 2028'
WHERE
BUDGETID = 'BUDGET 2008'
GO
-- UPDATE Budget Summary Master (GL00201)
UPDATE
GL00201
SET
BUDGETID = 'MASTER 2024'
WHERE
BUDGETID = 'BUDGET1'
GO
UPDATE
GL00201
SET
BUDGETID = 'FORECAST 2024'
WHERE
BUDGETID = 'BUDGET2'
GO
UPDATE
GL00201
SET
BUDGETID = 'REFORECAST 2024'
WHERE
BUDGETID = 'BUDGET3'
GO
UPDATE
GL00201
SET
BUDGETID = 'MASTER 2025'
WHERE
BUDGETID = 'BUDGET 2005'
GO
UPDATE
GL00201
SET
BUDGETID = 'MASTER 2026'
WHERE
BUDGETID = 'BUDGET 2006'
GO
UPDATE
GL00201
SET
BUDGETID = 'FORECAST 2027'
WHERE
BUDGETID = 'BUDGET 4'
GO
UPDATE
GL00201
SET
BUDGETID = 'MASTER 2028'
WHERE
BUDGETID = 'BUDGET 2008'
GO
This script has been created to be run only against the Fabrikam sample company database.
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.
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.