Hello All,
I dont work much on Jdev so not able to figure out why my code is not working.
The issue is my code is not able to return a row though tables have the data.I have inserted data in all the required tables but when the code comes to second line in below code it gives error java.lang.ArrayIndexOutOfBoundsException: 0
OAViewObjectImpl calrow=
(OAViewObjectImpl) this.getVO();
Row\[\] rows= calrow.findByKey(new Key(new Object\[\]
{ 90 }), 1);
return (ViewRowImpl) rows[0];
My VO is a select based query with below code:
Select distinct shift.shift_id,
shift.SHIFT_NAME,
shift.SHIFT_DESC,
dtl.schedule_id,
shift.START_TIME_MS_NUM,
shift.DURATION_MS_NUM
FROM SR_SHIFTS shift ,SR_SCHEDULE dtl
where shift.shift_id=dtl.shift_id
This VO is connected to his parent via view link on schedule_id.
I wanted to get a row for this VO where shift id is 90 . So I used code
OAViewObjectImpl calrow=
(OAViewObjectImpl) this.getVO();
Row[] rows= calrow.findByKey(new Key(new Object[]
{ 90 }), 1);
return (ViewRowImpl) rows[0];
but not sure why this didnt worked. VO has ShiftId as a key attribute.
My Jdev version is 12.2.1.6.0.
Thanks a lot in Advance.