Solved

when selecting from selector the data dont get update

  • 24 May 2023
  • 4 replies
  • 100 views

Userlevel 3
Badge +1

Hello,

 

I have a problem when i select from a selector field it should fill the data in the screen,

but it dosent do anything.

in the below picture i clicked the number but all the fields are still empty.

i made this screen from scratch so it seems im missing something right?

 

icon

Best answer by abdallaahmed61 26 May 2023, 15:46

View original

4 replies

Badge +11

Can you post the DAC code?

Userlevel 3
Badge +1

 

[Serializable]

    public class inspectionFormInq : IBqlTable

    {

        #region InspectionNbr

        [PXDBIdentity(IsKey = true)]

        public virtual int? InspectionNbr { get; set; }

        public abstract class inspectionNbr : PX.Data.BQL.BqlInt.Field<inspectionNbr> { }

        #endregion

        #region InspectionFormNbr

        [PXDBString(15)]

        //[PXDefault(PersistingCheck = PXPersistingCheck.NullOrBlank)]

        [PXUIField(DisplayName = "Inspection Number")]

        [AutoNumber(typeof(InspectionFormSetup.numberingID),

            typeof(AccessInfo.businessDate))]

        [PXSelector(typeof(Search<inspectionFormNbr>))]

        public virtual string InspectionFormNbr { get; set; }

        public abstract class inspectionFormNbr : PX.Data.BQL.BqlString.Field<inspectionFormNbr> { }

        #endregion

        #region Status

        [PXDBString(1, InputMask = "")]

        [PXUIField(DisplayName = "Status", Enabled = false)]

        [PXDefault("O")]

        [PXStringList(

            new string[] { "J", "O", "C" }, new string[] { "Job Ordered", "Open", "Canceled" })]

        public virtual string Status { get; set; }

        public abstract class status : PX.Data.BQL.BqlString.Field<status> { }

        #endregion

        #region Date

        [PXDBDate()]

        [PXUIField(DisplayName = "Date")]

        [PXDefault(typeof(AccessInfo.businessDate))]

        public virtual DateTime? Date { get; set; }

        public abstract class date : PX.Data.BQL.BqlDateTime.Field<date> { }

        #endregion

        #region Branches

        public abstract class branches : PX.Data.IBqlField

        {

        }

        protected string _Branches;

        [PXDBString(50, IsUnicode = true)]

        [PXUIField(DisplayName = "Branch")]

        [PXSelector(typeof(Search<SetUp.branchCD, Where<SetUp.autoNumbering, Equal<True>>>))]

        [PXDefault()]

        public virtual string Branches

        {

            get

            {

                return this._Branches;

            }

            set

            {

                this._Branches = value;

            }

        }

        #endregion

        #region Customer

        [PXDBString(20, InputMask = "")]

        [PXUIField(DisplayName = "Customer")]

        [PXDefault()]

        [PXSelector(typeof(Search2<Customer.acctCD, InnerJoin<ItemCustomers, On<ItemCustomers.customerID, Equal<Customer.bAccountID>>>, Where<ItemCustomers.itemsID, Equal<Current<inspectionFormInq.vehicle>>>>)

                   , new Type[]

                   {

                       typeof(Customer.acctCD),

                       typeof(Customer.acctName)

                   }

                   , DescriptionField = typeof(Customer.acctName)

                   , SubstituteKey = typeof(Customer.acctCD))]

        public virtual string Customer { get; set; }

        public abstract class customer : PX.Data.BQL.BqlString.Field<customer> { }

        #endregion

        #region Vehicle

        [PXDBInt()]

        [PXDefault()]

        [PXUIField(DisplayName = "Vehicle")]

        [PXSelector(typeof(Search<Items.itemsID>)

                    , new Type[] {

                        typeof(Items.code),

                        typeof(Items.name),

                        //typeof(Items.customer),

                        typeof(Items.brandID),

                        typeof(Items.modelID),

                        typeof(Items.purchesDate),

                        typeof(Items.lincensePlat),

                        typeof(Items.mgfDate),

                        typeof(Items.gurarantYear),

                    }

                    , DescriptionField = typeof(Items.name)

                    , SubstituteKey = typeof(Items.code))]

        public virtual int? Vehicle { get; set; }

        public abstract class vehicle : PX.Data.BQL.BqlInt.Field<vehicle> { }

        #endregion

        #region Phone

        [PXDBString(20, InputMask = "")]

        [PXUIField(DisplayName = "Phone Number")]

        public virtual string Phone { get; set; }

        public abstract class phone : PX.Data.BQL.BqlString.Field<phone> { }

        #endregion

        #region JobOrderID

        [PXDBString(20, InputMask = "")]

        [PXUIField(DisplayName = "Job Order ID", Enabled = false)]

        public virtual string JobOrderID { get; set; }

        public abstract class jobOrderID : PX.Data.BQL.BqlString.Field<jobOrderID> { }

        #endregion

 

  #region Comment

        [PXDBString(InputMask = "", IsUnicode = true)]

        [PXUIField(DisplayName = "Notes")]

        public virtual string Comment { get; set; }

        public abstract class comment : PX.Data.BQL.BqlString.Field<comment> { }

        #endregion

        #region Tstamp

        [PXDBTimestamp()]

        [PXUIField(DisplayName = "Tstamp")]

        public virtual byte[] Tstamp { get; set; }

        public abstract class tstamp : PX.Data.BQL.BqlByteArray.Field<tstamp> { }

        #endregion

        #region CreatedByID

        [PXDBCreatedByID()]

        public virtual Guid? CreatedByID { get; set; }

        public abstract class createdByID : PX.Data.BQL.BqlGuid.Field<createdByID> { }

        #endregion

        #region CreatedByScreenID

        [PXDBCreatedByScreenID()]

        public virtual string CreatedByScreenID { get; set; }

        public abstract class createdByScreenID : PX.Data.BQL.BqlString.Field<createdByScreenID> { }

        #endregion

        #region CreatedDateTime

        [PXDBCreatedDateTime()]

        public virtual DateTime? CreatedDateTime { get; set; }

        public abstract class createdDateTime : PX.Data.BQL.BqlDateTime.Field<createdDateTime> { }

        #endregion

        #region LastModifiedByID

        [PXDBLastModifiedByID()]

        public virtual Guid? LastModifiedByID { get; set; }

        public abstract class lastModifiedByID : PX.Data.BQL.BqlGuid.Field<lastModifiedByID> { }

        #endregion

        #region LastModifiedByScreenID

        [PXDBLastModifiedByScreenID()]

        public virtual string LastModifiedByScreenID { get; set; }

        public abstract class lastModifiedByScreenID : PX.Data.BQL.BqlString.Field<lastModifiedByScreenID> { }

        #endregion

        #region LastModifiedDateTime

        [PXDBLastModifiedDateTime()]

        public virtual DateTime? LastModifiedDateTime { get; set; }

        public abstract class lastModifiedDateTime : PX.Data.BQL.BqlDateTime.Field<lastModifiedDateTime> { }

        #endregion

    }

Userlevel 3
Badge +1

Can you post the DAC code?

check the above code plz

Userlevel 3
Badge +1

the autonumbering attribute was the problem 

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