About 10 years ago I did a post on changing emails on the test system so they didn’t go outside the organisation. This has worked well for a long time and no-one has mentioned any issues, until this week when I was working with a client and we made some changes to a remittance format and tested by emailing.
The remittance itself emailed to the test address fine, but the reprint remittance went to the original email address of the vendor used on the live system.
After doing a little exploring I found there were two additional tables which held this data for sent emails and which were used by the reprint remittance function.
The script below, includes the Internet Addresses table as well as these two tables for the Purchasing Series emails (both Purchase Order Processing and Payables Management); the highlighted email address can be changed to whatever email address you’re using for testing your Purchasing emails:
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). */ DECLARE @TestEmail VARCHAR(100) SET @TestEmail = 'firstname.lastname@example.org' -- UPDATE existing email addresses UPDATE SY01200 --Internet Addresses (SY01200) SET INET1 = @TestEmail ,EmailToAddress = @TestEmail ,EmailCcAddress = '' ,EmailBccAddress = '' WHERE Master_Type = 'VEN' -- 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 (12,19) -- Purchase Order Processing / Payables Management -- 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 (12,19) -- Purchase Order Processing / Payables Management GO