I added a JavaScript function to capture the ROWID of the rows that are selected in the GRID and passed it to a page item.
var gridView = apex.region("emp").call("getCurrentView"),
selectedRecords = gridView.getSelectedRecords(),
idValues = "";
for (var i = 0; i < selectedRecords.length; i++) {
var record = selectedRecords[i];
var idValue = record[0];
idValues += idValue;
if (i < selectedRecords.length - 1) {
idValues += ",";
}
}
$s("P43_ROW_SELECT", idValues);
However, I need to use the values that this item receives in a process (server side), so I have to submit the page first so that the item actually receives the values, so that I can use them in the process.
My question, if it is possible to pass the values that the item receives in my process in PL/SQl (server side), without the need to submit the page, is there another way besides submitting?
2
Answers
Thanks for the help, I did it differently, instead of passing it to a page item, I passed it as a parameter in the process call, something like this:
And I called in the process
You could use an AJAX process as explained in the docs, check the apex.server.process function here.
Another solution, the best fitting one, would be to add a Execute Server-side Code action to your DA and to list the item (P43_ROW_SELECT) in the Items to Submit section. Here you can find a more detailed explanation.