Solved

my tab view isnt loading with the master view

  • 27 May 2023
  • 3 replies
  • 66 views

Userlevel 3
Badge +1

i have a problem with my tabs the default values isnt working with the tabs 

also the save isnt saving the views for the tabs it only saves the master values only

this is my screen 

 

and this is my tab dac

 

[PXCacheName("InspectionMalfunctionCheck")]
    [PXPrimaryGraph(typeof(InspectionFormEntry))]
    public class InspectionMalfunctionCheck : IBqlTable
    {
        #region malfunctionCheckID
        public abstract class malfunctionID : PX.Data.IBqlField
        {
        }
        protected int? _MalfunctionID;
        [PXDBIdentity(IsKey = true)]
        [PXUIField(Enabled = false)]
        public virtual int? MalfunctionID
        {
            get
            {
                return this._MalfunctionID;
            }
            set
            {
                this._MalfunctionID = value;
            }
        }
        #endregion

        #region InspectionNbr
        [PXDBString(20, InputMask = "")]
        [PXUIField(DisplayName = "Inspection Nbr")]
        [PXDBDefault(typeof(InspectionFormInq.inspectionFormNbr))]
        [PXParent(typeof(Select<InspectionFormInq,
                    Where<InspectionFormInq.inspectionFormNbr,
                    Equal<Current<InspectionFormInq.inspectionFormNbr>>>>))]
        public virtual string InspectionNbr { get; set; }
        public abstract class inspectionNbr : PX.Data.BQL.BqlString.Field<inspectionNbr> { }
        #endregion

        #region CarControlSysTest
        [PXDBString(1, InputMask = "")]
        [PXUIField(DisplayName = "أختبار نظام تحكم السيارة")]
        [PXDefault("N")]
        [PXStringList
            (
            new string[] { "G", "M", "B", "N" },
            new string[] { "Good", "Medium", "Bad", "N/A" }
            )
        ]
        public virtual string CarControlSysTest { get; set; }
        public abstract class carControlSysTest : PX.Data.BQL.BqlString.Field<carControlSysTest> { }
        #endregion
}

icon

Best answer by darylbowman 27 May 2023, 13:07

View original

3 replies

Badge +10

The PXParent attribute is defining a relationship. The relationship statement you have would be defining a relationship of the parent record to itself. You need to define a relationship with the current table.

Like this:

[PXParent(typeof(Select<InspectionFormInq, Where<InspectionFormInq.inspectionFormNbr, Equal<Current<InspectionMalfunctionCheck.inspectionFormNbr>>>>))]

Userlevel 3
Badge +1

The PXParent attribute is defining a relationship. The relationship statement you have would be defining a relationship of the parent record to itself. You need to define a relationship with the current table.

Like this:

[PXParent(typeof(Select<InspectionFormInq, Where<InspectionFormInq.inspectionFormNbr, Equal<Current<InspectionMalfunctionCheck.inspectionFormNbr>>>>))]

that was a terrible mistake :(

btw do you know why the 
        [PXDefault("N")]
not working ?

Badge +10

You could try defining a constant:

public class notAvailable : PX.Data.BQL.BqlString.Constant<notAvailable>

        {

            public notAvailable() : base("N") { }

        }

 

Then:

[PXDefault(typeof(notAvailable))]

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