Solved

How to show PXStringListAttribute values in PXSelector list

  • 23 September 2022
  • 3 replies
  • 283 views

Userlevel 2
Badge

Hello Everyone,

I  Have a field that is CustomerID in that field adding Baccount.Type PXSelector Attribute , but here showing some values are Empty. I need all data in Selector.

can you plz let me know how can achieve this..!

Note : When I selected the empty record that value is Stored in CustomerID field.

 This is my DAC field Selector

 [PXSelector(typeof(Search6<BAccount.type,

                           Aggregate<GroupBy<BAccount.type>>, OrderBy<Asc<BAccount.type>>>),

                           typeof(BAccount.type))]

 

icon

Best answer by Fernando Amadoz 23 September 2022, 12:07

View original

3 replies

Userlevel 5
Badge +2

Hi @NageswaraRaoAddanki60 

For this scenario, I’d suggest using Acumatica’s [Customer] attribute.

This attribute encapsulates a series of other Attributes in one:

  • PXDBInt
  • PXUIFIeld
  • PXDimensionSelector

Plus It includes the selector to retrieve Customer information only..

 

Here is an example of its use in a native Acumatica DAC:

		#region CustomerID
public abstract class customerID : PX.Data.BQL.BqlInt.Field<customerID> { }

[Customer()]
[PXDefault()]
public int? CustomerID { get; set; }
#endregion

 

Userlevel 2
Badge

Hi @Fernando Amadoz 

     Thanks for your support. That customer Attribute show all customers table records, But here I want to show BAccount.Type ‘s and Duplicates not allowed.

Userlevel 5
Badge +2

@NageswaraRaoAddanki60 

In that case I’d suggest using the dropdown list available in the original BAccount.Type definition.

It would make sense to manage it as a dropdown given that it’s a finite list of options

		#region Type
public abstract class type : PX.Data.BQL.BqlString.Field<type> { }
protected String _Type;
[PXDBString(2, IsFixed = true)]
[PXUIField(DisplayName = "Type", Visibility = PXUIVisibility.SelectorVisible, Enabled = false)]
[BAccountType.List()]
public virtual String Type
{
get
{
return this._Type;
}
set
{
this._Type = value;
}
}
#endregion

 

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