Question

PXSelector don't select the value in required field

  • 24 February 2022
  • 3 replies
  • 312 views

Hi, I have a problem with a PXSelector, when I try to select an option, the field don't select the value, just select and clear the value

this is my code.

 #region PermisoSCT
    [PXDBString(50, IsKey = true, IsUnicode = true, InputMask = ">CCCCCCCCCCCCCCC")]
    [PXDefault(PersistingCheck = PXPersistingCheck.NullOrBlank)]
    [PXUIField(DisplayName = "Permiso SCT", Visibility = PXUIVisibility.SelectorVisible)]
    [PXSelector(typeof(Search<c_TipoPermiso.clave>),
                    typeof(c_TipoPermiso.descripcion))]
    public virtual string PermisoSCT { get; set; }
    public abstract class permisoSCT : PX.Data.BQL.BqlString.Field<permisoSCT> { }
    #endregion

 

and this is my code from the values for the pxSelector

   #region Clave
    [PXDBString(6, IsUnicode = true, InputMask = "")]
    [PXUIField(DisplayName = "Clave")]
    public virtual string Clave { get; set; }
    public abstract class clave : PX.Data.BQL.BqlString.Field<clave> { }
    #endregion

    #region Descripcion
    [PXDBString(254, IsUnicode = true, InputMask = "")]
    [PXUIField(DisplayName = "Descripcion")]
    public virtual string Descripcion { get; set; }
    public abstract class descripcion : PX.Data.BQL.BqlString.Field<descripcion> { }
    #endregion

 


3 replies

Userlevel 7
Badge +17

Hi @emmanuelmeza62  Can you please replace with below DAC and verify.

 

 #region PermisoSCT
[PXDBString(50, IsKey = true, IsUnicode = true, InputMask = ">CCCCCCCCCCCCCCC")]
[PXDefault(PersistingCheck = PXPersistingCheck.NullOrBlank)]
[PXUIField(DisplayName = "Permiso SCT", Visibility = PXUIVisibility.SelectorVisible)]
[PXSelector(typeof(c_TipoPermiso.clave),
typeof(c_TipoPermiso.descripcion))]
public virtual string PermisoSCT { get; set; }
public abstract class permisoSCT : PX.Data.BQL.BqlString.Field<permisoSCT> { }
#endregion

 

Can you please also confirm that, in .aspx page are you using PXSelector OR PXSegmentMask control?

hi @Naveen B , the code don’t work. I’m using PXSelector in .aspx

 

and show you the error,

when I select an option, 
don’t select anything, just only appears selected and is then deleted

 

Userlevel 7
Badge +17

@emmanuelmeza62  Thanks for the confirmation. I have used the below code format and it is working for me. Can you please also verify and confirm.

 

 #region PermisoSCT
[PXDBString(50, IsKey = true, IsUnicode = true, InputMask = ">CCCCCCCCCCCCCCC")]
[PXDefault(PersistingCheck = PXPersistingCheck.NullOrBlank)]
[PXUIField(DisplayName = "Permiso SCT", Visibility = PXUIVisibility.SelectorVisible)]
[PXSelector(typeof(Search<c_TipoPermiso.permisoSCT>), typeof(c_TipoPermiso.permisoSCT), typeof(c_TipoPermiso.clave),
typeof(c_TipoPermiso.descripcion))]
public virtual string PermisoSCT { get; set; }
public abstract class permisoSCT : PX.Data.BQL.BqlString.Field<permisoSCT> { }
#endregion

 Hope this helps!

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