Solved

Error when inserting in table for the first time


Userlevel 3
Badge +1

Hello,

 

i have a problem with a screen that i have made,

when the table has zero records and i try to insert a record this error appears.

but when there is one or more records in the table, the insert happens successfully.

Appreciate your feedback.

 

icon

Best answer by Naveen Boga 6 April 2023, 11:40

View original

7 replies

Userlevel 3
Badge +1

 

This is my DAC

Userlevel 7
Badge +17

Hi @abdallaahmed61  If I guess correctly, TransferNbr should be unique.

If this is the case, can you please mark TransferNbr as a key field at DAC level ( Is Key = True ) and check once?

Userlevel 3
Badge +1

Hi @abdallaahmed61  If I guess correctly, TransferNbr should be unique.

If this is the case, can you please mark TransferNbr as a key field at DAC level ( Is Key = True ) and check once?

When i make this, when i write something in the transfer number it disappears after i click on another field

Userlevel 7
Badge +17

@abdallaahmed61  Can you please DAC field here?

Userlevel 3
Badge +1

@abdallaahmed61  Can you please DAC field here?

you mean, make the edit and show you it ?

Userlevel 7
Badge +17

@abdallaahmed61  Hope you have removed Key for the Identify field.

And, here is the sample DAC field.

 


 #region TESTID
        [PXDBString(30, IsKey = true, IsUnicode = true, InputMask = "")]
        [PXDefault()]
        [PXUIField(DisplayName = "TEST ID", Required = true)]
        [PXSelector(typeof(Search<MySetup.TransferNbr>), typeof(MySetup.TransferNbr), typeof(MySetup.description), typeof(MySetup.isActive))]
        public virtual string TransferNbr { get; set; }
        public abstract class transferNbr : BqlString.Field<transferNbr> { }

        #endregion


 

Userlevel 3
Badge +1

@abdallaahmed61  Hope you have removed Key for the Identify field.

And, here is the sample DAC field.

 


 #region TESTID
        [PXDBString(30, IsKey = true, IsUnicode = true, InputMask = "")]
        [PXDefault()]
        [PXUIField(DisplayName = "TEST ID", Required = true)]
        [PXSelector(typeof(Search<MySetup.TransferNbr>), typeof(MySetup.TransferNbr), typeof(MySetup.description), typeof(MySetup.isActive))]
        public virtual string TransferNbr { get; set; }
        public abstract class transferNbr : BqlString.Field<transferNbr> { }

        #endregion


 

It Seems like the PXDefault was the solution, thank you so much for your time and effort.

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