Skip to main content
Question

Error when creating a PXDBLocalizeable field in a new table/DAC

  • Nov 3, 2026 6:29 PM UTC
  • 2 replies
  • 11 views
  • Translate All

kevlynch
Jr Varsity II
Forum|alt.badge.img

Hi, 

I’m creating a pretty simple new table / DAC to create a validated list of cities for custom usage. 

This table consists of 2 fields, a CityID (int) identifier and a CityName (string). 

I want the CityName to be multi-lingual, so based on what I found in documentation, I’m creating it with the  [PXDBLocalizableString(50, IsUnicode = true)] attribute. 

When I try to open a simple grid view screen I get this error “Invalid object name 'UsrCityKvExt'.”

The field is displayed and I see the language selector in it, but data can’t be displayed/inserted/updated.

When I just use a PXDBString instead, I have no errors, and I can do everything in a single language.

 

This is a snippet of the DAC I’m using for UsrCity (it also has the typical Acumatica system fields CreatedBy, TStamp, etc.)

 

    #region CityID
    [PXDBIdentity(IsKey = true)]
    [PXUIField(DisplayName = "City ID", Enabled = false)]
    public virtual int? CityID { get; set; }

    public abstract class cityID : PX.Data.BQL.BqlInt.Field<cityID> { }
    #endregion

    #region NoteID
    [PXNote()]
    public virtual Guid? NoteID { get; set; }
    public abstract class noteID : PX.Data.BQL.BqlGuid.Field<noteID> { }
    #endregion      
      
    #region CityName
    [PXDBLocalizableString(50, IsUnicode = true)]
    //[PXDBString(50, IsUnicode = true)]
    [PXUIField(DisplayName = "City")]
    public virtual string CityName { get; set; }
    public abstract class cityName : PX.Data.BQL.BqlString.Field<cityName> { }
    #endregion

 

Any idea what I’m missing to get this to work as expected?

2 replies

Forum|alt.badge.img+8
  • Captain II
  • Nov 3, 2026 7:04 PM UTC

What’s interesting is that UsrCityKvExt will be a table in your database and it should have nothing to do with your table.

You’ll have UsrCity and UsrCityKvExt

Do you see both tables in your database?

Translate

Steve Milner
Varsity III
Forum|alt.badge.img+6
  • Varsity III
  • Nov 3, 2026 7:21 PM UTC

@kevlynch your DAC is fine. NoteID with PXNote is what PXDBLocalizableString needs. What's missing is the table the translations live in.

Multilanguage values are stored in a companion table named after your table plus KvExt, keyed on NoteID. That's the UsrCityKvExt the error is looking for. PXDBString never touches it, which is why that version works.

Publishing builds that table for you, but only when UsrCity is in your customization project as a Custom Table Schema item and the schema includes the NoteID column. If you created UsrCity with a SQL script item, created it straight in SSMS, or added the schema before NoteID was in the table, publish has nothing to build it from.

On the Database Scripts page, add UsrCity with Add Custom Table Schema. If it's already there, run Reload from Database so the schema picks up NoteID. Then publish, and UsrCityKvExt gets created alongside UsrCity.

If you'd rather script it yourself, copy the structure of any stock KvExt table, such as InventoryItemKvExt.

Translate