Thanks very much. I still am confused as to how to meet my requirement..I am using APEX 24.1
On an interactive grid, I need to default column values when a new row is created. However, the default values are different if the row is created from the "Add Row" button on the toolbar, or from the row actions menu.
To accomplish this, I created a dynamic action with the event set to Initialize Row (grid). There is a true action set to "Executive Javascript.
For the javascript, I am using:"
var region = apex.region(this.milestones_grid); // Replace `this.regionName` with the actual region ID
var model = region.widget.getModel();
// ... rest of your code
var record = this.data.record;
var action = this.data.action;
if (action === "add-row") {
// Set defaults for add-row action
model.setValue(record, "DESCRIPTION", "MILESTONE");
} else if (action === "selection-add-row") {
// Set defaults for selection-add-row action
model.setValue(record, "DESCRIPTION", "TASK");
}
When the row row is created, default values are not being set.
Please can you offer me your kind guideance.
Thanks