we have added some additional status options to Status field in cases screen using automation steps and this is working as expected. Now our requirement is to show the status options in alphabetical order sort by ascending way. Can some one please suggest us how to achieve this.
We are in Acumatica 2019 R2
public class SelectableDataTypes : PXStringListAttribute
{
public string[] AllowedLabels = new string[]
{
"A","B","C"
};
public string[] AllowedValues = new string[]
{
"ValueA","ValueB","ValueC"
};
}
protected virtual void CRCase_RowSelected(PXCache sender, PXRowSelectedEventArgs e, PXRowSelected BaseEvent)
{
BaseEvent?.Invoke(sender, e);
CRCase doc = e.Row as CRCase;
if (doc == null)
return;
PXStringListAttribute.SetList<CRCase.status>(Base.Case.Cache, null, new SelectableDataTypes().AllowedValues, new SelectableDataTypes().AllowedLabels);
}