Column does not belong to table

Okay, I’ll do that. Thanks a lot for looking it over.

Hi Nathan, This response from support seems to conflict with your expectations. What do you think?

Case:CS0000704021


Support says:
Thanks for the update and I believe it’s the same issue. Let me explain.

In Epicor9, there was only 1 Table system and all tables began with Epicor. With Epicor10, Development split the systems into 2 sections - the Application (and those tables begin with Erp) and those related to the ICE Tools (and those tables begin with Ice).

For the Issue I submitted to Development, they created Investigational SCR 154134, which has the following Short Description:

Database Migration - E9 to E10 Company UD migration Erp.Company_UD table contains the E9.05.702a UD data while Ice.Company does not.

Development researched the issue and determined that having both Erp.Company and Ice.SysCompany Extended with the same fields will cause upgrade issues, so they decided that only Erp.Company should be Extended.

So the Conversion program was modified to migrate all E9 UD Data to the Erp.Company_UD table. The Conversion program was also modified to Drop the Ice.SysCompany_UD table, which would explain why you do not see that Table with the Data Dictionary Viewer.

Development also decided to Open Enhancement SCR 168118, which has the following Short Description:

EPIC - UD Table Entry - Create a standard pattern for the split tables that are common between ICE and ERP, eg. user, plant and company.

Since ENH SCR 168118 is still Open, I will link this Support Case to Development’s Enhancement Problem Case PRB0099904.

Please let me know if you have any questions.


Joe says:

Hi Daniel,
It sounds similar, but if looking at the data dictionary is a proper diagnostic tool then our case is slightly different – We have a Company_UD table, but we don’t have a sysCompany_UD table at all.
Thanks,
Joe


Support says:
I reported a similar issue some time ago. The CR is 21903ESC and has the following Description:

PROBLEM DESCRIPTION: If the E9.05.702a Company table contains UD data (for example, in Character01, in Number01, in Date01, and in CheckBox01), the E9 to E10 Conversion program creates 2 sets of _UD tables for the Company table - one set for Erp.Company and another set for Ice.SysCompany. However, only the Erp.Company_UD table contains the E9.05.702a UD data. The Ice.SysCompany_UD table contains all zeroes (0).

PROGRAM ID: Customization/E9 to E10 Conversion Program.

EXPECTED BEHAVIOR: Development needs to decide what the correct Behavior should be. For example, should both E10 _UD tables be populated with E9.05.702a Company UD data? Or should only 1 set of E10 _UD table have been created?

I have reviewed the SCRs and there is much information to disgust, however, before I explain what I found, I would like to first know if the Problem described above is the same issue (or similar) that you are reporting.

reviewing.

A lot of internal discussion on what correct should be, and I know where we landed in 10.2.100–coming from E905 to E10.2.100 there should be a erp.company_ud and ice.syscompany_ud with the same columns that were used in E905 on company_ud OR any of the standard user defined fields on company. SCR 202606

Let’s ignore what the correct/intended state is in 10.1.600.x, and just create a Number01 extended UD column on Ice.SysCompany via Extended UD table maintenance, then regen data model. Does that address the issue with the customer? If so, I think we are a little closer to know what correct should be in 10.1.600.x as well.

How do I go about adding fields? The sysCompany_UD table doesn’t exist in our version and sysCompany is not available in the Extended UD Table Maintenance.

Hi, any update? I’m also struggling at getting the old Number01 of Company_UD
Getting the same error column does not belong to table with code: adaCompany.CompanyData.Company.Rows(0)(“Number01”)

Created another Number01 on SysCompany table, no luck

Did you look up the column in a BAQ and see what the actual column header is? I believe an added UD field always has _c attached to the end of it.

I thought that the added fields always ended with “_c” too. But that is incorrect. If the field existed as a UD Filed in E9 (like Number01), it will come in with the same name (i.e. no “_c” suffix).

right, but the poster said he added the field after the upgrade to try to get it to work. Either way, he should look at it and see what the actual column header is.

1 Like

The poster didn’t mention if they did the Data Regen …

1 Like

Checked in BAQ, it is just Number01 in table Erp.Company, it doesn’t have “_c” as it was brought up from Epicor9.
Tried both Number01 and Number01_c, no luck (several Data Model Regen, of course :wink:)

Interesting that it works with UDField in table Part, but not in Company

Dim adaPart As PartAdapter = New PartAdapter(oTrans)
adaPart.BOConnect()
adaPart.GetByID(PartNum)
i = adaPart.PartData.Part.Rows(0)(“Number01”)

1 Like

oh wait, in code, you have to use company1. I forgot about that oddity. If this is in a BPM use the Ctrl+space to get the code to autocomplete like intellisense. This will help with some of those errors.

For what it’s worth …

The “_c” suffix won’t be added to fields that “look like” old UD fields. For example, I can add “Number12345” and it takes that name. But “Number_12345” becomes “Number_12345_c”

image

1 Like

It looks like you’re referencing the object as opposed to the value. You might try .ToString(); at the end of your i assignment.

I ended up giving up on the conversion and adding a new field which has been working fine. As Brandon and Calvin pointed out, there are some differences in how the field is named. Here’s a snippet from a customization that references the new field

nextECO = adapterCompany.CompanyData.Company.Rows[0]["ECO_Number_c"].ToString();

actually I’m testing it in the dumb way
MessageBox.Show("N01 "+adaCompany.CompanyData.Company.Rows(0)("Number01").ToString())

You are using [] and not () right? They are different.

this is some old VB code, so (), I wish it is C# but task list is full
added new UD field, regening data model (fingers crossed)

1 Like

Finally got it working, here are my trial-and-error steps:

  • After Upgrade, there is Company_UD.Number01, no SysCompany_UD.Number01
    adaCompany.CompanyData.Company.Rows(0)("Number01") ERROR column does not belong to table
  • Added Number01 for SysCompany, regen data model (stopped the application pool)
    Not working still
  • Added UD field “someID_c” to Company, regen data model
    Does NOT work
  • Added “someID_c” to SysCompany, regen data model
    Perfect, but not sure if the UD Field need to exist in both Company_UD and SysCompany_UD or just the latter

Updated the UDField, both Company_UD.someID_c and SysCompany_UD.someID_c are updated

adaCompany.CompanyData.Company.Rows(0).BeginEdit()
adaCompany.CompanyData.Company.Rows(0)("someID_c") = adaCompany.CompanyData.Company.Rows(0)("someID_c") + 1
adaCompany.CompanyData.Company.Rows(0).EndEdit()

adaCompany.Update()

but the old Number01 fields are now all zero, no idea why and when, they were here before the tests :frowning:
may be it synced with the new SysCompany_UD.Number01 which are new and zero (got a backup tho)

I’d say this is probably why.