The question of the day is this: How did this happen?
I've spent hours, days even, trying to figure out what happened.
All of a sudden, several dozen supplier records are duplicated at the store level. HQ database seems fine. So I poke around in Admin to see shat is going on...
On the Supplier table, the new supplier records (the ones with the higher IDs) have the correct HQID associated with them. The original supplier records now have an HQID of 0.
On the SupplierList table, any new items created since the duplication error occurred are associated with the new SupplierID, while older items are still associated with the original SupplierID.
My solution: Open both HQ Admin and Store Ops Admin. In HQ Admin, SELECT * from Supplier, sort by SupplierName
In SO Admin, SELECT * from Supplier, sort by SupplierName
Look down the list until you find a record with HQID = 0.
Is there a duplicate? If not, then check HQ Supplier table for correct HQID. No record at HQ? Check SupplierList for associated items. If no associated items, delete record. If yes to associated items, note for later... [sad face - another less than fun project]
If there is a duplicate, then: UPDATE SupplierList SET SupplierID = OLD WHERE SupplierID = NEW DELETE from Supplier WHERE ID = NEW UPDATE Supplier SET HQID= CORRECT WHERE ID = OLD
SELECT * from SupplierList WHERE SupplierID = ID of record with HQID = 0
This is crazy. As far as I can tell, any supplier record that has been updated in HQ and had a subsequent WS206 issued to update the info at the stores has resulted in the existing Store Ops record being disassociated from HQ and a new supplier record being created.
Once I have corrected this at each store (thank goodness I only have four stores) I will reindex all store databases and the HQ database. I will then issue a WS206 for one supplier and check the store databases for duplicates. If a duplicate record has been created, I don't know what I will do.
Aside from an explanation of the obvious question of 'why?' I would also be very interested to hear from anyone that has experienced anything similar.
Hoping your day has been less interesting than mine, Tom