Solved

Multi-Select Combo Box Functionality Not Working

  • 20 July 2021
  • 3 replies
  • 360 views

Userlevel 3
Badge +1

I have created attributes on the attributes form below

And these values should be shown as multi-select in Sales Order Line in a user defined field, code is below for getting those values, but in the field it only shows combo box (one value selection).

public class SOOrderEntry_Extension : PXGraphExtension<SOOrderEntry>
{
#region Event Handlers
protected void SOLine_UsrAccessories_FieldSelecting(PXCache cache, PXFieldSelectingEventArgs e)
{

List<string> allowedValues = new List<string>();
List<string> allowedLabels = new List<string>();

foreach (CSAttributeDetail objCSAttributeDetail in PXSelect<CSAttributeDetail,
Where<CSAttributeDetail.attributeID, Equal<Required<CSAttributeDetail.attributeID>>>>.Select(Base, "ACCITEMS"))


{
allowedValues.Add(objCSAttributeDetail.ValueID);
allowedLabels.Add(objCSAttributeDetail.Description);
}

e.ReturnState = PXStringState.CreateInstance(e.ReturnState, 10, true, typeof(SOLineExt.usrAccessories).Name, false, -1, string.Empty, allowedValues.ToArray(), allowedLabels.ToArray(), false, null);



}

 

icon

Best answer by Naveen Boga 20 July 2021, 07:55

View original

3 replies

Userlevel 7
Badge +17

Sure @TharidhiP  Let me know if you get any issues.

Userlevel 3
Badge +1

Hi @Naveen B , thank you for your support, will try this out and see.

Userlevel 7
Badge +17

Hi @TharidhiP  Please find the code for getting multi combo checkbox..

public class SOOrderEntry_Extension : PXGraphExtension<SOOrderEntry>
{
#region Event Handlers
protected void SOLine_UsrAccessories_FieldSelecting(PXCache cache, PXFieldSelectingEventArgs e)
{

List<string> allowedValues = new List<string>();
List<string> allowedLabels = new List<string>();

foreach (CSAttributeDetail objCSAttributeDetail in PXSelect<CSAttributeDetail,
Where<CSAttributeDetail.attributeID, Equal<Required<CSAttributeDetail.attributeID>>>>.Select(Base, "ACCITEMS"))


{
allowedValues.Add(objCSAttributeDetail.ValueID);
allowedLabels.Add(objCSAttributeDetail.Description);
}

e.ReturnState = PXStringState.CreateInstance(e.ReturnState, 10, true, typeof(SOLineExt.usrAccessories).Name, false, -1, string.Empty, allowedValues.ToArray(), allowedLabels.ToArray(), false, null);

((PXStringState)e.ReturnState).MultiSelect = true;

}

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