i created InterActive Datagrid and it’s colum currencyId create dynamicAction event execute java script query and set this code
// Get the Interactive Grid model
var model = apex.region("PAYEMNTDetails").widget().interactiveGrid("getViews", "grid").model;
// Retrieve the selected rows
var selectedRecords = model.getSelectedRecords();
if (selectedRecords && selectedRecords.length > 0) {
// Access the first selected record
var record = selectedRecords[0];
// Get the CurrencyId field value
var currencyId = record[3]; // Replace 3 with the actual index of CurrencyId field, or:
// var currencyId = record.getValue("CURRENCYID"); // If the field name is "CURRENCYID"
console.log("CurrencyId:", currencyId);
} else {
console.log("No row is selected.");
}
i want to get the current value after changed
the problem : this code give me previous value before change
2
Answers
the cause was because region don't refresh after change. i used following code before my code
apex.region("PAYEMNTDetails").widget().interactiveGrid("getViews", "grid").refresh();
I had never used this Dtagrid, but what you are writing seems like an issue with update after change. E.g. try to request data with some time offset
If you get the correct value with this, then it is obvious you have to find out when to actually request data (some ‘update’ event from the grid, for example).
Also, I found two similar questions answered:
Refresh selected rows in IG
Select IG rows after refresh