How to Pass Multiple Parameters in Business Rule using Groovy Script
Summary:
We have written this Business Rule and we want to Update the Status Field based on three parameters peno, pperiod and ptype.
def vo = newView('Employee')
addBindVariable(vo,'EMPLOYEE_NNUMBER','Text')
setBindVariable(vo,'EMPLOYEE_NUMBER',peno)
vo.appendViewCriteria("EMPLOYEE_NUMBER = :EMPLOYEE_NUMBER")
addBindVariable(vo,'PERIOD','Text')
setBindVariable(vo,'PERIOD',pperiod)
vo.appendViewCriteria("PERIOD = :PERIOD")
addBindVariable(vo,'TYPE','Text')
setBindVariable(vo,'TYPE',ptype)
vo.appendViewCriteria("TYPE = :TYPE")
vo.executeQuery()
while (vo.hasNext()) {
def r = vo.next();
r.Status = pstatus;
}
Please advise.
Content (please ensure you mask any confidential information):
Version (include the version you are using, if applicable):
Code Snippet (add any code snippets that support your topic, if applicable):