Regenerating Data Model Error (Epicor Administration Console)

Hey everyone! I am trying to add UD fields to the ShipHead table. I add them in epicor, everything is dandy. I go to the server to regenerate the data model for the database, and I keep getting the following error:

“The following tables were not synchronized due to errors. Review the log for more detailed information. Tables: Erp.JobHead_UD”

This table has been through the process before, nothing has changed since the last time I ran it. I have no idea where the log is, so I cannot view specifics about the actual error. Have you run into this before? I have done IISRESET, still nothing. This stops the process, so I cannot load in the new data after. The ShipHead_UD table appears in SQL server, but I still cannot use the fields in customizations Let me know if you have any ideas!

Hi

The only thing that I can see is the error is related to the Erp.JobHead_UD not your ShipHead table, is it possible someone has added some invalid UD records to JobHead that is causing your error?

Mark, there is that possibility. I could not figure it out, so I deleted the JobHead_UD table, and started over. This is not ideal for the future, especially if we have a lot of data in it. Since this is a test database, I am not going to lease sleep over that. This worked though, and I just recreated the JobJHead_UD table. Thanks for the help!

Stupid question - What’s in the log?

2 Likes

We had this problem due to orphaned records. Check it using the following code:

select JobHeadPre=(Select count(*) From Erp.JobHead_UD/*Affected UD table*/
       where not exists(select 1 from Erp.JobHead/*Affected parent table*/
       base where base.SysRowID = Erp.JobHead_UD.ForeignSysRowID) /*Affected UD table*/) 

If you have orphaned records, you will need to delete them.

delete Erp.JobHead_UD/*Affected UD table*/
                     where not exists
                           (select 1 from Erp.JobHead/*Affected parent table*/ base 
                                  where base.SysRowID = Erp.JobHead_UD.ForeignSysRowID) /*Affected UD
1 Like

Not a stupid question. I have no idea. There is no log that I can find. I have no idea what it is talking about haha.

Okay, I will have to give this a shot if I run into the error again. Thank you for the suggestion!