Hi,
There is a requirement of sending a mail to the resource with Timesheet rejection notes when a manager rejects the timesheet.
I have created a process on timesheet object and below is the query in the custom script. This process initiates when a timesheet is returned.
select r.email,p.prstart,n.prvalue,c.first_name,c.last_name
from prtimesheet s,prtimeperiod p,prnote n,cmn_sec_users c,srm_resources r
where S.PRTIMEPERIODID = P.PRID
and N.PRRECORDID = S.PRID
and UPPER(N.PRTABLENAME) = 'PRTIMESHEET' and n.updated_by=c.id
and s.prresourceid=r.id and s.prid='${gel_objectInstanceId}'
order by n.prmodtime desc
When a timesheet is returned and a Note is entered and submitted, this process initiates but with '0' rows. I am assuming, it is taking time to create a row in Prnote table.
I tried pre and post conditions on notes, but nothing worked.
Is there any way that I can send the rejection notes to the resource? Please help me if I am doing anything wrong.
Thanks,
Jeevana.