maxwell3000
maxwell3000
Posts: 60


19 days ago
maxwell3000
maxwell3000
Posts: 60
Hi,

I have a question regarding a way to update the email address on some accounts. The way our company is set up, we all have 2 email addresses. These email addresses can change over time as well as people can be moved from one subcontracting company to another. We are having an issue where their decisions account is not set up to their “primary” email they are wanting to use. We are in the process of making sure everyone’s primary email is set correctly in AD since this is what we are using to sync the decisions account with. However, we still have data in the system with some of these old email address. Is there a way we can update all the old emails to the new ones? Or is this going to have to be a custom sql script?
0 link reply with quote
cameron@decisions.com
cameron@decisions.com
Posts: 76


19 days ago
The best way to this would be to make those changes in AD and re-sync as you mentioned. We can, however, run a custom SQL script to replace the company domain on account email addresses and entity names. See below SQL scripts that will do so:

******IMPORTANT: Backup your database before running these queries.******

UPDATE entity_account
SET entity_name = REPLACE(entity_name, '@company1.com', '@company2.com')
WHERE account_id = '[ACCOUNT ID]'

UPDATE entity_account
SET email_address = REPLACE(email_address, '@company1.com', '@company2.com')
WHERE account_id = '[ACCOUNT ID]'
0 link reply with quote


(Ctrl+Enter)




Powered by Jitbit Forum 8.3.8.0 © 2006-2013 Jitbit Software