Skip to main content
Solved

Custom fields added to Kit Assembly screen don't save

  • February 13, 2024
  • 4 replies
  • 331 views
  • Translate All

I am adding various custom fields to Acumatica. All seem to work ok, except on one screen. I have done a test on a sales demo instance. Adding a field to Sales Orders screen works and the field updates and persists when saving and the reloading the record. Putting a field on the Kit Assembly screen allows you to edit it, but it doesn’t save. When you reload the screen the field value is gone. I guess I am missing something that I need to add but that the other screens don’t need, or I have done something wrong somewhere. Here are my screenshots of what I have changed showing one that works and one that doesn’t.

 

 

 

 

 

 

 

 

 

 

 

Best answer by darylbowman

The difference is that this screen is based on INKitRegister, which is a PXProjection. Not only do you need to specify the field in the projection, you also need to specify where the BQL field value is coming from.

 

For instance, this is the field definition for INKitRegister.DocType:

[PXDBString(1, IsKey = true, IsFixed = true, BqlField = typeof(INRegister.docType))]
[PXDefault("P")]
[INDocType.KitList]
[PXUIField(DisplayName = "Type", Visibility = PXUIVisibility.SelectorVisible)]
[PXDependsOnFields(new Type[] { typeof(tranDocType) })]
public virtual string DocType { get; set; }

Notice the BqlField = typeof(INRegister.docType)

 

Your field definition on INKitRegister should look like this, which points to the actual value being stored in INRegister.UsrTest:

[PXDBString(20, BqlField = typeof(INRegister.usrTest))]
[PXUIField(DisplayName = “Test”)]

 

View original

4 replies

darylbowman
Captain II
Forum|alt.badge.img+17

The difference is that this screen is based on INKitRegister, which is a PXProjection. Not only do you need to specify the field in the projection, you also need to specify where the BQL field value is coming from.

 

For instance, this is the field definition for INKitRegister.DocType:

[PXDBString(1, IsKey = true, IsFixed = true, BqlField = typeof(INRegister.docType))]
[PXDefault("P")]
[INDocType.KitList]
[PXUIField(DisplayName = "Type", Visibility = PXUIVisibility.SelectorVisible)]
[PXDependsOnFields(new Type[] { typeof(tranDocType) })]
public virtual string DocType { get; set; }

Notice the BqlField = typeof(INRegister.docType)

 

Your field definition on INKitRegister should look like this, which points to the actual value being stored in INRegister.UsrTest:

[PXDBString(20, BqlField = typeof(INRegister.usrTest))]
[PXUIField(DisplayName = “Test”)]

 

Translate

Naveen Boga
Captain II
Forum|alt.badge.img+20

@chriserlebach34  Yes, as suggested by Daryl, you missed to add the BqlField reference as it is a PXProjection. Please refer the screenshots below for reference.

 

Attached sample customization package, you can import into you instance and check.

 

This is the code actually missed your code

 

 

Translate

darylbowman
Captain II
Forum|alt.badge.img+17

@chriserlebach34 - Were you able to resolve this?

Translate

Thanks everyone.

Daryl, yes your suggestion fixed it.

 

[PXDBString(15, IsUnicode = true, BqlField = typeof(INRegisterExt.usrOrderNbr))]

[PXUIField(DisplayName="Order Number")]

Translate