Solved

Multiselect combo not returning values

  • 10 July 2024
  • 7 replies
  • 49 views

Userlevel 4
Badge +1

Hello, 

I have followed this article to create a multiselect combo box. 

https://asiablog.acumatica.com/2016/03/multiselect-combo-box.html

Everything operates in the way it is shown in the article, values are displayed in the combo box, I can select 2 values and those values are saved to the database. 

However, when I leave the current record and then return to the record, the combo box value is empty. The values are in the database but they don’t appear on the combo box. 

Here is my DAC

[PXDBString(255, IsUnicode = true)]
[PXUIField(DisplayName = "Brands")]
[PXStringList(new string[] { "D", "C", "T", "I" }, new string[] { "Development", "Consulting", "Training", "Implementation" }, MultiSelect = true)]
public virtual string UsrBrands { get; set; }
public abstract class usrBrands : PX.Data.BQL.BqlString.Field<usrBrands> { }

..and the ASPX

<px:PXDropDown runat="server" ID="CstPXSelector334" Size="M" DataField="usrBrands" AllowMultiSelect="True" />

I’m not sure what else is required, can anyone help please?

icon

Best answer by Naveen Boga 10 July 2024, 15:52

View original

7 replies

Userlevel 7
Badge +19

Hi @stephenward03  Are you adding this field in the GRID? 

Userlevel 4
Badge +1

It’s on the opportunities form. See below. It has values in the screen shot, but if I click the Previous record button and then the Next button, the combo box is empty.

 

Userlevel 2
Badge

Have you tried DataField="UsrBrands" (capital ‘U’) in your aspx? In my examples, the DataField is the Public Virtual String and it is working

Userlevel 4
Badge +1

Thanks for the suggestion. Just changed from usrBrands to UsrBrands but the problem still occurs. 

Userlevel 7
Badge +19

@josiahl64  Here is the Problem. Please find the details below.

You might have extended the DAC PX.Objects.CR.CROpportunity but also you need to extend the PX.Objects.CR.Standalone.CROpportunity DAC as well for the same field then only value will be persisted in the Database. 2018 R1(and later) the PX.Objects.CR.CROpportunity DAC is a projection DAC.

Please review the below link for your reference

https://www.augforums.com/forums/everything-else/custom-date-field-in-opportunity-screen-not-displaying-data/

https://stackoverflow.com/questions/50880116/custom-field-on-cropportunity-doesnt-display-saved-value-since-upgrading-from-6

Userlevel 4
Badge +1

Hi @Naveen Boga, you are correct. I extended the PX.Objects.CR.Standalone.CROpportunity DAC and now values are returned from the db and displayed correctly on screen. The problem was the projection DAC, not the multiselect combo. 

Thanks for sharing your knowledge. 

Userlevel 7
Badge +19

Yes, you are right, the problem is with Projection DAC . I’m glad that problem is resolved.

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