function portalpage_OnInit() { var navObj=portalObj.tabArea.tabs["PAGE"].getNavlet('inbasketActions') navObj.target = window //parameters below are //1. Action id //2.Dispay Name in menu //3. action navObj.changeItem("action0","Approve","parent.inbasketDoAction('Approve', '0')") //parent.inbasketDoAction() is the built in Lawson function that is normally called navObj.changeItem("action1","Reject","reject1('Reject', '1')") } function reject1(action, row){ var vRequester=page.parameters.RQH_REQUESTER var vRequisition=page.parameters.RQH_REQ_NUMBER var reason=prompt("Please enter the reason you selected " + action, "") reason = reason.replace(/[^a-zA-Z 0-9]+/g,''); //attach reason to workunit, or put it in a custom table with the requester/requisition variables so it can be read after the action node parent.inbasketDoAction(action, row); }
function portalpage_OnInit() { var navObj=portalObj.tabArea.tabs["PAGE"].getNavlet(“inbasketActions”) navObj.target = window //parameters below are //1. Action id //2.Dispay Name in menu //3. action navObj.changeItem("action0","Approve","parent.inbasketDoAction(‘Approve’, ‘0’)") //parent.inbasketDoAction() is the built in Lawson function that is normally called navObj.changeItem("action1","Reject","reject1(‘Reject’, ‘1’)") } function reject1(action, row){ var vRequester=page.parameters.RQH_REQUESTER var vRequisition=page.parameters.RQH_REQ_NUMBER var reason=prompt("Please enter the reason you selected " + action, "") reason = reason.replace(/[^a-zA-Z 0-9]+/g,’’); //attach reason to workunit, add as comment, or put it in a custom table with the requester/requisition variables so it can be read after the action node parent.inbasketDoAction(action, row);