I have a very simple javascript in my dynamic action processing block (there are additional actions after this one). This script just s=checks to make sure at least 1 value in the Interactive Grid has a value of Y.
All I want to do is stop processing if no rows are set to Y and output a message. My Javascripting skills are non existent. The code below always returns false. and therefore never gets to the next dynamic action.
The code is below
var widget = apex.region('BULKAPPROVE').widget();
var grid = widget.interactiveGrid('getViews','grid');
var model = grid.model;
var valset = false;
model.forEach
(
function(r)
{
if (model.getValue(r,"APPROVED") == 'Y')
{
valset = true;
};
}
);
if (valset == false)
{
alert("At least one SSR must be selected for approval ?");
return false;
}
else
{
return true;
}