{"id":188,"date":"2012-07-26T19:16:27","date_gmt":"2012-07-26T18:16:27","guid":{"rendered":"http:\/\/www.darrencoupland.com\/blog\/?p=188"},"modified":"2012-08-15T22:09:20","modified_gmt":"2012-08-15T21:09:20","slug":"removing-email-addresses-from-non-production-environments","status":"publish","type":"post","link":"https:\/\/www.darrencoupland.com\/blog\/2012\/07\/removing-email-addresses-from-non-production-environments\/","title":{"rendered":"Removing Email Addresses from Non-Production Environments"},"content":{"rendered":"<p>A few simple scripts to run when building a 2009 non-production environment from your 2009 production database to remove email addresses from the &#8216;CustTable&#8217;, &#8216;VendTable&#8217; and &#8216;Address&#8217; table this will ensure no emails can be sent in error to your customers or vendors from your non-production environment.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">-- Change to correct DB\r\nUSE &lt;Your Ax Database&gt;\r\n\r\nUPDATE Address\r\nSET EMAIL = &#039;&#039;\r\nWHERE\r\nEMAIL != &#039;&#039;\r\n\r\nUPDATE VendTable\r\nSET EMAIL = &#039;&#039;\r\nWHERE\r\nEMAIL != &#039;&#039;\r\n\r\nUPDATE CustTable\r\nSET EMAIL = &#039;&#039;\r\nWHERE\r\nEMAIL != &#039;&#039;<\/pre>\n<p>DISCLAIMER: You may need to add additional tables\/fields for any customizations you may be using.<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>A few simple scripts to run when building a 2009 non-production environment from your 2009 production database to remove email addresses from the &#8216;CustTable&#8217;, &#8216;VendTable&#8217; and &#8216;Address&#8217; table this will ensure no emails can be sent in error to your customers or vendors from your non-production environment. &#8212; Change to correct DB USE &lt;Your Ax [&hellip;]<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[3],"tags":[29,8,27,25,28],"class_list":["post-188","post","type-post","status-publish","format-standard","hentry","category-dynamics-ax-2009","tag-administration","tag-ax2009","tag-nonproduction","tag-scripts","tag-t-sql"],"_links":{"self":[{"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/posts\/188","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/comments?post=188"}],"version-history":[{"count":1,"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/posts\/188\/revisions"}],"predecessor-version":[{"id":554,"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/posts\/188\/revisions\/554"}],"wp:attachment":[{"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/media?parent=188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/categories?post=188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.darrencoupland.com\/blog\/wp-json\/wp\/v2\/tags?post=188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}