Environment:
Oracle APEX (web version)
Steps to Reproduce:
I am working with an Interactive Grid (IG) in Oracle APEX.
When I make changes through the browser's console using the following JavaScript code:
let model = apex.region('work_ig').call("getViews", "grid").model;
let row = model.getSelectedRecords()[0];
model.setValue(row, "X3", sum);
The changes are correctly reflected on the screen, and when I click the save button, the changes are saved to the database successfully.
However, when I use the same JavaScript code within a Dynamic Action triggered by a column change event (where I calculate values dynamically based on changes in other columns), the changes are visible on the screen (i.e., the value of "X3" changes), but when I click the save button of the IG, the changes are not sent to the database.
Observation:
- When the change is made via Dynamic Action, the data in the model changes to purple (indicating that it has been modified).
- When I check the payload, I can see that the updated data is not included, meaning it is not being sent to the database when saving the IG.
Expected Behavior:
Changes made through the Dynamic Action (via JavaScript) should be correctly saved to the database when the save button is clicked, just like changes made directly via the browser console.
Questions:
- Is there something specific I need to do for the changes made by JavaScript within the Dynamic Action to be included in the save payload?
- Why does the change show on the screen but not persist to the database?
Thank you for your help!