Skip to main content
Answer

Cannot display selected field in acumatica 2025 modern ui

  • October 13, 2025
  • 12 replies
  • 164 views

Forum|alt.badge.img

I have data view like this 

[PXFilterable]
[PXCopyPasteHiddenView]
public PXSelectJoin<INItemClass, InnerJoin<MDSCSalesPersonItemClass, On<INItemClass.itemClassID, Equal<MDSCSalesPersonItemClass.itemClassID>>>, Where<MDSCSalesPersonItemClass.salesNbr, Equal<Current<MDPXSalesCustomer.salesNbr>>>> sitestatus;

 

and typescript

  @viewInfo({containerName: "siteStatus"})

    siteStatus = createCollection(INItemClass);

 

and view

export class INItemClass extends PXView  {

    @columnConfig({ allowCheckAll: true }) Selected : PXFieldState;

    @columnConfig({width: 70})  ItemClassID : PXFieldState;

    @columnConfig({width: 100, allowFastFilter: true})  Descr : PXFieldState;

}

I try to show selected field checkbox in grid like this

        <qp-grid id="gripSiteStatus" batchUpdate="True" view-model.ref="gripSiteStatusVM"

            view.bind="siteStatus">

            <qp-grid-column field="Selected" type="CheckBox" width="50" allowCheckAll="true" />

            <qp-grid-column field="ItemClassID" width="70" />

            <qp-grid-column field="Descr" width="100" allowFastFilter="true" />

        </qp-grid>

Best answer by aleksandrsechin

Since your Selected field is defined in the joined DAC, you need to reference it in the views.ts file using two underscores (__):

export class INItemClass extends PXView  {
@columnConfig({ allowCheckAll: true }) MDSCSalesPersonItemClass__Selected : PXFieldState;
...
}

You don't need to declare anything special for this field in the HTML file.

No changes are required in MD101001.ts or MD101001.html — leave them as they are in the files you attached above.

The final result should be:

MD101001.ts
export class MD101001 extends PXScreen {
   …
   @viewInfo({containerName: "siteStatus"})
   siteStatus = createCollection(INItemClass);
   …
}

MD101001.html
   …
   <qp-grid id="gripSiteStatus" view.bind="siteStatus"></qp-grid>
   …

views.ts
export class INItemClass extends PXView  {
@columnConfig({ allowCheckAll: true }) MDSCSalesPersonItemClass__Selected : PXFieldState;
...
}

12 replies

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

I'm gathering that you're ripping out the 'important' portions of TypeScript and HTML. I suggest you post the entirety of both files.

I don't think you should even need to indicate the grid fields in HTML if you're wanting to see all of them.

Do you receive errors or anything?


Forum|alt.badge.img
  • Author
  • Freshman II
  • October 15, 2025

I'm gathering that you're ripping out the 'important' portions of TypeScript and HTML. I suggest you post the entirety of both files.

I don't think you should even need to indicate the grid fields in HTML if you're wanting to see all of them.

Do you receive errors or anything?

this clissic ui

this modern ui

 


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

Could you post your DAC for INItemClass? I’m assuming that’s a custom DAC, not the out-of-box DAC?


Forum|alt.badge.img
  • Author
  • Freshman II
  • October 16, 2025

Could you post your DAC for INItemClass? I’m assuming that’s a custom DAC, not the out-of-box DAC?

I create data view by join INItemclass (no customization) with custom dac(MDSCSalesPersonItemClass) like this

[PXFilterable]
[PXCopyPasteHiddenView]
public PXSelectJoin<INItemClass, InnerJoin<MDSCSalesPersonItemClass, On<INItemClass.itemClassID, Equal<MDSCSalesPersonItemClass.itemClassID>>>, Where<MDSCSalesPersonItemClass.salesNbr, Equal<Current<MDPXSalesCustomer.salesNbr>>>> sitestatus;

 

this is my custom dac

namespace Sales
{
    using System;
    using PX.Data;
    using PX.Objects.IN;
    using PX.Objects.GL;
    
    [System.SerializableAttribute()]
    [PXCacheName("MDSCSalesPersonItemClass")]
    public class MDSCSalesPersonItemClass : PXBqlTable, IBqlTable
    {
        #region Selected
        public abstract class selected : PX.Data.IBqlField
        {
        }
        protected bool? _Selected;
        [PXBool]
        [PXUIField(DisplayName = "Selected")]
        public virtual bool? Selected { get; set; }
        #endregion
        #region SalesNbr
        public abstract class salesNbr : PX.Data.IBqlField
        {
        }
        protected string _SalesNbr;
        [PXDBString(15, IsUnicode = true, IsKey = true)]
        [PXUIField(DisplayName = "SalesNbr")]
        [PXDBDefault(typeof(MDSCSalesCustomer.salesNbr))]
        [PXParent(typeof(Select<MDSCSalesCustomer,
        Where<MDSCSalesCustomer.salesNbr,
        Equal<Current<MDSCSalesPersonItemClass.salesNbr>>>>))]
        public virtual string SalesNbr
        {
            get
            {
                return this._SalesNbr;
            }
            set
            {
                this._SalesNbr = value;
            }
        }
        #endregion
        #region SalesPersonID
        public abstract class salesPersonID : PX.Data.IBqlField
        {
        }
        protected int? _SalesPersonID;
        [PXDBInt]
        [PXDefault()]
        [PXUIField(DisplayName = "CustomSalesPersonID")]
        [PXDBDefault(typeof(MDSCSalesCustomer.salesPersonID))]
        public virtual int? SalesPersonID
        {
            get
            {
                return this._SalesPersonID;
            }
            set
            {
                this._SalesPersonID = value;
            }
        }
        #endregion
        #region BAccountID
        public abstract class bAccountID : PX.Data.IBqlField
        {
        }
        protected int? _BAccountID;
        [PXDBInt]
        [PXUIField(DisplayName = "BAccountID")]
        [PXDBDefault(typeof(MDSCSalesCustomer.bAccountID))]
        public virtual int? BAccountID
        {
            get
            {
                return this._BAccountID;
            }
            set
            {
                this._BAccountID = value;
            }
        }
        #endregion
        #region LineNbr
        public abstract class lineNbr : PX.Data.IBqlField
        {
        }
        protected int? _LineNbr;
        [PXDBInt(IsKey = true)]
        [PXDefault()]
        [PXUIField(DisplayName = "LineNbr")]
        [PXLineNbr(typeof(MDSCSalesCustomer.lineCntr))]
        public virtual int? LineNbr
        {
            get
            {
                return this._LineNbr;
            }
            set
            {
                this._LineNbr = value;
            }
        }
        #endregion
        #region ItemClassID
        public abstract class itemClassID : PX.Data.IBqlField
        {
        }
        protected int? _ItemClassID;
        [PXDBInt(IsKey = true)]
        [PXUIField(DisplayName = "ItemClassID")]
        [PXDefault()]
        [PXSelector(typeof(Search<INItemClass.itemClassID>),
            typeof(INItemClass.itemClassID),
            typeof(INItemClass.descr),
            SubstituteKey = typeof(INItemClass.itemClassCD),
            DescriptionField = typeof(INItemClass.descr))]
        public virtual int? ItemClassID
        {
            get
            {
                return this._ItemClassID;
            }
            set
            {
                this._ItemClassID = value;
            }
        }
        #endregion
        #region BranchID

        public abstract class branchID : PX.Data.IBqlField
        {
        }
        protected Int32? _BranchID;
        [Branch(typeof(MDSCSalesCustomer.branchID))]
        public virtual Int32? BranchID
        {
            get
            {
                return this._BranchID;
            }
            set
            {
                this._BranchID = value;
            }
        }
        #endregion
        #region DocDate
        public abstract class docDate : PX.Data.IBqlField
        {
        }
        protected DateTime? _DocDate;
        [PXDBDate()]
        [PXDefault(typeof(MDSCSalesCustomer.docDate))]
        [PXUIField(DisplayName = "DocDate")]
        public virtual DateTime? DocDate
        {
            get
            {
                return this._DocDate;
            }
            set
            {
                this._DocDate = value;
            }
        }
        #endregion

        #region Descr
        public abstract class descr : PX.Data.IBqlField
        {
        }
        protected string _Descr;
        [PXDBString(60, IsUnicode = true)]
        [PXDefault()]
        [PXUIField(DisplayName = "Description")]
        public virtual string Descr
        {
            get
            {
                return this._Descr;
            }
            set
            {
                this._Descr = value;
            }
        }
        #endregion
        #region tstamp
        public abstract class Tstamp : PX.Data.IBqlField
        {
        }
        protected byte[] _tstamp;
        [PXDBTimestamp()]
        public virtual byte[] tstamp
        {
            get
            {
                return this._tstamp;
            }
            set
            {
                this._tstamp = value;
            }
        }
        #endregion
        #region CreatedByID
        public abstract class createdByID : PX.Data.IBqlField
        {
        }
        protected Guid? _CreatedByID;
        [PXDBCreatedByID()]
        public virtual Guid? CreatedByID
        {
            get
            {
                return this._CreatedByID;
            }
            set
            {
                this._CreatedByID = value;
            }
        }
        #endregion
        #region CreatedByScreenID
        public abstract class createdByScreenID : PX.Data.IBqlField
        {
        }
        protected string _CreatedByScreenID;
        [PXDBCreatedByScreenID()]
        public virtual string CreatedByScreenID
        {
            get
            {
                return this._CreatedByScreenID;
            }
            set
            {
                this._CreatedByScreenID = value;
            }
        }
        #endregion
        #region CreatedDateTime
        public abstract class createdDateTime : PX.Data.IBqlField
        {
        }
        protected DateTime? _CreatedDateTime;
        [PXDBCreatedDateTime()]
        public virtual DateTime? CreatedDateTime
        {
            get
            {
                return this._CreatedDateTime;
            }
            set
            {
                this._CreatedDateTime = value;
            }
        }
        #endregion
        #region LastModifiedByID
        public abstract class lastModifiedByID : PX.Data.IBqlField
        {
        }
        protected Guid? _LastModifiedByID;
        [PXDBLastModifiedByID()]
        public virtual Guid? LastModifiedByID
        {
            get
            {
                return this._LastModifiedByID;
            }
            set
            {
                this._LastModifiedByID = value;
            }
        }
        #endregion
        #region LastModifiedByScreenID
        public abstract class lastModifiedByScreenID : PX.Data.IBqlField
        {
        }
        protected string _LastModifiedByScreenID;
        [PXDBLastModifiedByScreenID()]
        public virtual string LastModifiedByScreenID
        {
            get
            {
                return this._LastModifiedByScreenID;
            }
            set
            {
                this._LastModifiedByScreenID = value;
            }
        }
        #endregion
        #region LastModifiedDateTime
        public abstract class lastModifiedDateTime : PX.Data.IBqlField
        {
        }
        protected DateTime? _LastModifiedDateTime;
        [PXDBLastModifiedDateTime()]
        public virtual DateTime? LastModifiedDateTime
        {
            get
            {
                return this._LastModifiedDateTime;
            }
            set
            {
                this._LastModifiedDateTime = value;
            }
        }
        #endregion
    }
}
 


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

Change MDSCSalesPersonItemClass in views.ts to include

@columnConfig({ allowCheckAll: true }) Selected : PXFieldState;

Change MD101001 in MD101001.ts from

siteStatus = createCollection(INItemClass);

 to

siteStatus = createCollection(MDSCSalesPersonItemClass);

 


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

Were you able to get this working?


Forum|alt.badge.img
  • Author
  • Freshman II
  • October 21, 2025

Were you able to get this working?

When I change, It show checkbox but it’s not working with existing logic. When I click add it cannot convert object. I want selected field on INItemClass


Forum|alt.badge.img+3

Since your Selected field is defined in the joined DAC, you need to reference it in the views.ts file using two underscores (__):

export class INItemClass extends PXView  {
@columnConfig({ allowCheckAll: true }) MDSCSalesPersonItemClass__Selected : PXFieldState;
...
}

You don't need to declare anything special for this field in the HTML file.

No changes are required in MD101001.ts or MD101001.html — leave them as they are in the files you attached above.

The final result should be:

MD101001.ts
export class MD101001 extends PXScreen {
   …
   @viewInfo({containerName: "siteStatus"})
   siteStatus = createCollection(INItemClass);
   …
}

MD101001.html
   …
   <qp-grid id="gripSiteStatus" view.bind="siteStatus"></qp-grid>
   …

views.ts
export class INItemClass extends PXView  {
@columnConfig({ allowCheckAll: true }) MDSCSalesPersonItemClass__Selected : PXFieldState;
...
}


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

I want selected field on INItemClass

Ok, but a ‘Selected’ field does not exist on INItemClass. It exists on MDSCSalesPersonItemClass.

 

Since your Selected field is defined in the joined DAC, you need to reference it in the views.ts file using two underscores (__):

I haven’t seen this before, but I checked the source code and this IS the correct way to reference joined DACs. However, I wouldn’t be surprised if the ‘Selected’ field is disabled referenced this way because it’s not the primary DAC.

You may need to rewrite your data view so that MDSCSalesPersonItemClass is the primary DAC and INItemClass is the joined DAC.


Forum|alt.badge.img
  • Author
  • Freshman II
  • October 22, 2025

Since your Selected field is defined in the joined DAC, you need to reference it in the views.ts file using two underscores (__):

export class INItemClass extends PXView  {
@columnConfig({ allowCheckAll: true }) MDSCSalesPersonItemClass__Selected : PXFieldState;
...
}

You don't need to declare anything special for this field in the HTML file.

No changes are required in MD101001.ts or MD101001.html — leave them as they are in the files you attached above.

The final result should be:

MD101001.ts
export class MD101001 extends PXScreen {
   …
   @viewInfo({containerName: "siteStatus"})
   siteStatus = createCollection(INItemClass);
   …
}

MD101001.html
   …
   <qp-grid id="gripSiteStatus" view.bind="siteStatus"></qp-grid>
   …

views.ts
export class INItemClass extends PXView  {
@columnConfig({ allowCheckAll: true }) MDSCSalesPersonItemClass__Selected : PXFieldState;
...
}

Now It display selected field. I have another problem. I can select all but cannot select one by one. In classic ui, I choose select all or select one by one

 


Forum|alt.badge.img+3

I think this is happening because the Selected field is defined in the non-primary DAC of the BLC view, as ​@darylbowman  mentioned earlier. I would suggest moving this field to a DAC extension of INItemClass. In that case, you won't need to use double underscores in views.ts — just add the Usr prefix, since the field will be declared in the DAC extension.

Alternatively (if possible), you could redefine your BLC view so that MDSCSalesPersonItemClass becomes the primary DAC and INItemClass is the joined one, as ​@darylbowman  also mentioned. In that case, you also won't need to use double underscores for the Selected field in views.ts, but you will need to use them to display fields from the INItemClass DAC.


Forum|alt.badge.img+3

Have you managed to make any progress on your issue?