Today I want to discuss with you a ways to define selectors and data for them.
In this case system will automatically select value from database Carrier table and show list of Carrier IDs to user.
In this case you have 2 potential problems:
- you should have a database table, otherwise you will see an error.
- There is no way to dynamically change or adjust data that is returned to user
- You can limited configurations to control selector behavior.
To solve these problem Acumatica has a Custom Selector attributes:
public class CustomerPriceClassAttribute : PXCustomSelectorAttribute
this.DescriptionField = typeof(ARPriceClass.description);
protected virtual IEnumerable GetRecords()
foreach (ARPriceClass pc in PXSelect<ARPriceClass>.Select(this._Graph))
yield return pc;
In this case you see that you have simple attribute, that is really similar to the attribute for first example. Using GetRecords method you can create a custom BQL querry, select any data you want, apply any filter and return it as a IEnumberble collection.
In the user interface you will see exactly data provided by your custom query.