Skip to Content
0
Aug 25, 2023 at 08:13 PM

Help with capturing OVS selection in AfterModify Event

73 Views

Hi Community,

I am having troubles trying to capture the selected values from an OVS selection in the AfterModify event within a BusinessPartners extension object. I have an extension field, called employee, within the Common node of the Business Partner (apparently unable to extend the root node). I placed the Employee field in the Details section of the UI and attached the built-in BusinessPartner selector to retrieve employees. My goal is to capture the selected Employee ID and look up the formatted name to put into a second extension field. The OVS works great. My problem is that when I read the Employee value in the AfterMotify event on the root node, the previous value shows up in code instead of the selected value.
I also tried AfterModify on the Common node. This works fine the first time a selection is made, but if I make a second selection, the AfterModify Event does not fire.
Any ideas?

Code in root.AfterModify. The value prior to selecting was 345. The newly selected value is 347.

image.png

This code works in Common.AfterModify, but only for the first selection. The second selection does not fire the event.

image.png

Attachments

image.png (213.4 kB)
image.png (119.0 kB)