Copy Account Categories Between Microsoft Dynamics GP Companies

Microsoft Dynamics GPWhen implementing Microsoft Dynamics GP for a new client, they usually have very similar setup between companies. While you can use the Professional Services Tools Library tool Company Copy, you sometimes need to replicate data which was configured after this function had been used.

I’ve previously posted scripts to copy segments and financial calendars; today’s script will copy Account Categories to a new company ensuring you have the categories in both companies:

/*
Created by Ian Grieve of azurecurve|Ramblings of a Dynamics GP Consultant (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). */
-- update account description in Account Category Master (GL00102) where exists UPDATE #AccountCategories SET ACCATDSC = #SourceAccountCategories.ACCATDSC FROM GL00102 AS #Accountcategories INNER JOIN TEST../GL00102 AS #SourceAccountCategories ON #SourceAccountCategories.ACCATNUM = #AccountCategories.ACCATNUM GO -- insert new data into Account Category Master (GL00102) INSERT INTO GL00102 (ACCATNUM,ACCATDSC) --VALUES (SELECT ACCATNUM,ACCATDSC FROM TEST..GL00102 WHERE ACCATNUM NOT IN (SELECT ACCATNUM FROM GL00102)) GO

Ensure you have a good backup before running the script and validate the data afterwards.

What should we write about next?





Your Name (required) –
Your Email (required) –

2 thoughts on “Copy Account Categories Between Microsoft Dynamics GP Companies

  1. Andy Nifong says:

    More good stuff as always, Ian – thanks!

Leave a Reply

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