0
votes

I have a select list on my page and I created a dynamic action on the list to execute some javascript based on selected value. I tried using

var sel_val = apex.item("P2_TYPES").getValue();

but it did not return the selected value

also tried using $x('P2_TYPES') but still unsuccessful - returns false

How can I retrieve a selected value of a select list from a dynamic action?

1
The code is correct. apex.item('ITEM_NAME').getValue() returns the selected value from a select list. If you create a dynamic action when this item change, so that code will get the value selected.romeuBraga

1 Answers

0
votes

Only with this information I can't say why this is not working, but the code is correct.

This will works.

Create a dynamic action

WHEN: change a item. no condition

True action: execute javascript code

alert(apex.item("ITEM_NAME_HERE").getValue())