Solved

DynamicSelector based on dropdown value

  • 11 February 2022
  • 7 replies
  • 463 views

Userlevel 4
Badge +1

Hi All,

I have a form with two fields: 

1- dropdown field with values like Opportunity & Service Orders.

2- Selector field to show Opportunity or Service Orders Base selector values based on the dropdown value.

How can I reuse the existing selectors of base class?.

 

 

Thanks in Advance,

Moulali Shaik.

 

 

 

icon

Best answer by jinin 11 February 2022, 14:32

View original

7 replies

Userlevel 7
Badge +17

Hi, @MoulaliShaik79  Is this your custom form?

If you wanted to use as same selectors, you can take it from the respective DACs.

  • Opportunity.cs
  • FSServiceOrders.cs

 

 

Userlevel 4
Badge +1

Hi @Naveen B ,

I need to show them in the dynamic selector based on the dropdown value.

 

 

 

Thanks,

Moulali Shaik.

Userlevel 7
Badge +17

Yes @MoulaliShaik79  You can add a condition for that selector you in DAC to pass the Dropdown value. 

So that based on your dropdown value, Selector field will load the values accordingly.

Userlevel 4
Badge +1

Hi @Naveen B,

I have tried the below approach with Id and Description field. it is working fine,

LINK:

====

https://stackoverflow.com/questions/37053983/dynamically-changing-pxselector-in-acumatica

 

But to get all the fields (approximately 30 fields from the base selectors), I need to declare 30 fields and need to pass 30 fields in the attribute constructor. Instead of the declaring 30 fields, I am looking another approach.

 

Currently approach:

===============

As you suggested taking them from the respective DAC, Do I need to create 2 unbound properties for the 2 selectors (Opportunity & Service Orders)? or Can we have 2 Selector attributes under the single DAC field (here my DAC field is : RefNbr which is string type).

or How can I write the condition inside the DAC? any basic syntax example… would be helpful to me.

 

 

Thanks

Moulali Shaik.

 

 

Userlevel 7
Badge +11

  

Hi @MoulaliShaik79 

  •      You can create 2 separate selector fields for Opportunity and ServiceOrders.
  •      Based on the Dropdown selection, you can enable the fields, If selected as ServiceOrders, show Service Orders selector. If Opportunity selected, show Opportunity selector. Manage this on the row selected event.

    Not sure we can add a condition based selector for the DAC field
Userlevel 4
Badge +1

Hi @jinin ,  @Naveen B,

As you suggested, I took 2 separate selectors and  done visible and invisible functionality in the RowSelected Event Handler to make it as work as excepted based on the dropdown values. Now It is working fine.

Thanks a lot for your help.

 

 

Thanks,

Moulali Shaik.

 

 

Userlevel 7
Badge +11

Thank you @MoulaliShaik79  for the update

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