We will use automation script from stopping users from closing or completing workorder without actual labor transaction which also includes task work order labor array.
- Launch Point: Object Lauch Point
- Business object: WORKORDER
- Variables:
- var_act_lab bind with array using relation LABTRANS.LABTRANSID*
- var_task_lab bind with array of task work order relation WOACTIVITY.LABTRANS.LABTRANSID*
- Create error message in database configuration with errorgroup = 'wo' and errorkey = 'act_lab_exists'
- Condition: :status in ('COMP', 'CLOSE')
- copy and paste below mentioned code:
if (var_act_lab is None) and (var_task_lab is None) :
errorgroup = 'wo'
errorkey = 'act_lab_exists'
That's it :)
Useful Information!
ReplyDelete