Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to get row ID in JavaScript if field changed?

GosforthFeb 16 2021

I use following code to get row ID.

var grid$ = apex.region( "some_region" ).call( "getCurrentView" ).view$;
var $te = $(this.triggeringElement);
var rowId = $te.closest('tr').data('id');

Then I can get field value:

 var ig$ = apex.region("some_region").widget();
 var model_net_price = ig$.interactiveGrid("getViews", "grid").model;
 var record = model.getRecord(rowId);
 var field_val = model.getValue( record, "FIELD");

Works well ONLY if field is changed by clicking on it (chage event, lose focus...). It does not get rowID when field is changed by another dynamic action. rowId is empty.
Is there another method to get this ID?
Regards,
G.

This post has been answered by Hamza Al-abbasi on Feb 17 2021
Jump to Answer
Comments
Post Details
Added on Feb 16 2021
2 comments
1,426 views