Solved

Custom fields added to Kit Assembly screen don't save

  • 13 February 2024
  • 4 replies
  • 83 views

Userlevel 1

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.

 

 

 

 

 

 

 

 

 

 

 

icon

Best answer by darylbowman 13 February 2024, 19:08

View original

4 replies

Badge +11

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”)]

 

Userlevel 7
Badge +17

@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

 

 

Badge +11

@chriserlebach34 - Were you able to resolve this?

Userlevel 1

Thanks everyone.

Daryl, yes your suggestion fixed it.

 

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

[PXUIField(DisplayName="Order Number")]

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved