Skip to main content
Solved

How to use subitems on the new screen ?


Forum|alt.badge.img
  • Freshman I
  • 22 replies

I Make New Scene I need List Subitem Input type , I make new DAC. I try to check the Subitem but no value if I press f3 Any . why is this even though the table subitem has a value ?

 

This My new Screen

 

Thi table 
My Sub item many value

 



This My DAC Code 

using PX.Data;
using PX.Objects.CS;
using PX.Objects.IN;
using PX.Objects.PO;
using System;

namespace Car
{
    [Serializable]
    [PXCacheName("DetailDAC")]
    public class DetailDAC: IBqlTable
    {
        #region DocumentID
        [PXDBString(30, IsUnicode = true, InputMask = "")]
        [PXUIField(DisplayName = "Document ID")]
        public virtual string DocumentID { get; set; }
        public abstract class documentID : PX.Data.BQL.BqlString.Field<documentID> { }
        #endregion

        #region InventoryID
        [PXDBInt]
        [PXUIField(DisplayName = "Inventory ID")]
        [PXSelector(
        typeof(Search<InventoryItem.inventoryID>),
        typeof(InventoryItem.inventoryCD),
        typeof(InventoryItem.descr),
        SubstituteKey = typeof(InventoryItem.inventoryCD),
        DescriptionField = typeof(InventoryItem.descr)
        )]
        public virtual int? InventoryID { get; set; }
        public abstract class inventoryID : PX.Data.BQL.BqlString.Field<inventoryID> { }
        #endregion


        #region SubItemID
        [PXDBInt]
        [PXUIField(DisplayName = "Sub Item")]
        [SubItem(
            typeof(INSubItem.subItemID))]
        public abstract class subItemID : PX.Data.BQL.BqlInt.Field<subItemID> { }
        public virtual int? SubItemID { get; set; }
        #endregion


}

Best answer by Chris Hardgrove

Try this...
[SubItem(
            typeof(DetailDAC.inventoryID))]

Be sure that your InventoryID field has the property CommitChanges = true, within the aspx.

For  longevity, it’s best to move away from subitems, as mentioned above.

View original
Did this topic help you find an answer to your question?

2 replies

aaghaei
Captain II
Forum|alt.badge.img+10
  • Captain II
  • 1201 replies
  • May 20, 2024

@Febri 

Just a heads up that Subitem in Acumatica is being deprecated and possibly your investment will become obsolete.


Chris Hardgrove
Jr Varsity I

Try this...
[SubItem(
            typeof(DetailDAC.inventoryID))]

Be sure that your InventoryID field has the property CommitChanges = true, within the aspx.

For  longevity, it’s best to move away from subitems, as mentioned above.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings