Update Microsoft Dynamics GP Customer Emails on Test Including Sent Emails

Microsoft Dynamics GPAfter creating a new script for updating vendor emails on test which includes the emails of sent items, I figured that a similar script will be needed to update the email address on sent emails in the Sales Series.

The script below, includes the tables holding sent email information for the Sales Series emails (both Receivables Management and Sales Order Processing) as well as the usual Internet Addresses table; the highlighted email address can be changed to whatever email address you’re using for testing your Sales emails:

/*
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). */
DECLARE @TestEmail VARCHAR(100) SET @TestEmail = 'email@example.com' -- UPDATE existing email addresses UPDATE SY01200 --Internet Addresses (SY01200) SET INET1 = @TestEmail ,EmailToAddress = @TestEmail ,EmailCcAddress = '' ,EmailBccAddress = '' WHERE Master_Type = 'CUS' -- UPDATE Email Details of previously sent emails UPDATE SY04910 --Email Details (SY04910) SET EmailToAddress = @TestEmail ,EmailCcAddress = CASE WHEN LEN(CAST(EmailCcAddress AS VARCHAR(1000))) = 0 THEN '' ELSE @TestEmail END WHERE MODULE1 IN (9,11) -- Receivables Management / Purchase Order Processing -- UPDATE Email Details of previously sent emails UPDATE SY04915 --Email History (SY04915) SET EmailToAddress = @TestEmail ,EmailCcAddress = CASE WHEN LEN(CAST(EmailCcAddress AS VARCHAR(1000))) = 0 THEN '' ELSE @TestEmail END WHERE MODULE1 IN (9,11) -- Receivables Management / Purchase Order Processing GO

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.

Your Name

Your Email

Suggested Topic

Suggestion Details

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.

Leave a Reply

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