I need to write the value of selected item in an interactive grid into session.
It is working, but on page startup I get this error:
0: Unable to get property '20' of undefined or null reference
I am using a "Selection Changed [Interactive Grid]' dynamic action, with a javascript action as below:
function setItemValue(node) {
$s('P3_SELECTED_REG_UID', node);
apex.server.process('MY_PROCESS',{ pageItems: '#P3_SELECTED_REG_UID' },{dataType: "text"});
}
var i, selectedIds = "", model = this.data.model;
selectedIds = model.getValue(this.data.selectedRecords[0], "REGISTRATION_UID");
console.log(selectedIds);
setItemValue(selectedIds);
The javascript action is set to NOT FIRE on initialization. So I don't understand why I am getting this error. The error disappears when I disable the dynamic action.
It all works fine, but I could do without a javascript error on page load.