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
may be it synced with the new SysCompany_UD.Number01 which are new and zero (got a backup tho)