5 Replies Latest reply on Oct 26, 2016 9:00 AM by DCastell

    Emails did not get copied when doing a Copy/Move Contact

    neocrm Apprentice

      GMPE - 2014.1.0.468

      One contact got deleted by mistake, restore database from backup, I can see all history under the history tab but when trying to do a Copy/Move Records from the restored database to the current database, everything copied except emails, both Email-in and Email-out. Tried restoring from different backups but still no emails. I have checked and confirm there is no filter enabled in the History view. I can see emails in other contact records.

      Any suggestions will be very much appreciated.

       

      Neo

        • 1. Re: Emails did not get copied when doing a Copy/Move Contact
          DCastell Expert

          we'll need to know more about what you mean when you say you 'restored the database' and so on. 

           

          Do you mean you restored just a contact database containing the cont___ tables (contact1, conthist, etc.) or did you restore an entire GoldMine database complete with CAL, MAILBOX, etc. tables as well? 

          • 2. Re: Emails did not get copied when doing a Copy/Move Contact
            neocrm Apprentice

            Hi Doug, we restored the complete database as a new database, then used copy/move to copy the contact with history from the restored database to the current database. I can see full history of the contact in the restored database but after copying the contact to the current database, all emails are missing. It is still a mystery but the user moved on so it doesn't really matter if it can be resolved or not. Thanks

            • 3. Re: Emails did not get copied when doing a Copy/Move Contact
              neocrm Apprentice

              Sorry Doug, I just noticed that your respond was from 3 months ago, I never saw the notice until now.

              • 4. Re: Emails did not get copied when doing a Copy/Move Contact
                Shaul.Bel Apprentice

                If you know the ACCOUNTNO of the deleted contact you can run a query on the mailbox table of the restored database which will insert the missing records of mailbox.

                it should be something like

                 

                select LINKRECID,FLAGS,USERID,FOLDER,FOLDER2,ACCOUNTNO,CREATEON,MAILSIZE,MAILDATE,MAILTIME,MAILREF,LOPRECID,MAILID,EXT,RFC822

                ,recid

                into OriginalData.dbo.MAILBOX

                (LINKRECID,FLAGS,USERID,FOLDER,FOLDER2,ACCOUNTNO,CREATEON,MAILSIZE,MAILDATE,MAILTIME,MAILREF,LOPRECID,MAILID,EXT

                ,RFC822,recid)

                from RestoredData.dbo.MAILBOX

                where ACCOUNTNO='ActualAccountno' and recid not in (select recid from OriginalData.dbo.mailbox where ACCOUNTNO='ActualAccountno')

                1 of 1 people found this helpful
                • 5. Re: Emails did not get copied when doing a Copy/Move Contact
                  DCastell Expert

                  It's worth noting that when you delete a contact, the contact1, contact2, contsupp, etc. stuff is actually deleted, but the mailbox records (and related conthist, srectype M records) are left in the database with their accountno values stripped. 

                   

                  As such, when restoring deleted contacts from backup, I generally just delete all mail associated with the contact (by comparing to the recids to the restored database) before restoring via SQL script.

                  1 of 1 people found this helpful