Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Project server programming - Error for self approving timesheet

18 views
Skip to first unread message

sindia

unread,
Mar 6, 2009, 6:24:01 AM3/6/09
to
Could you please help to resolve the following issue?

I have a scenario where I need to validate timesheet before submission. For
this, I have written custom code in the timesheet "OnSubmitting" eventhandler.
If the timesheet is not valid, I cancel the timesheet submission( e.Cancel =
true)

public override void OnSubmitting(PSContextInfo contextInfo,
TimesheetPreSubmitEventArgs e)
{
base.OnSubmitting(contextInfo, e);
e.Cancel = timesheetValidator.ValidateTimeSheet(e.TsUID);//
custom validation
}
This is working as expected in the case of Resource and Resource's timsheet
manager being "different" persons.
However I am facing some issues in the case of Resource and his timesheet
manager being the "same person"

When Resource and his timesheet manager are the "same person"
If the timesheet is valid,
On "Save and Submit" of the timesheet, the timesheet gets submitted and
gets approved automatically.
Timesheet's Status changes to "Approved" and Transaction comment = "System
generated automatic approval"

If the timesheet is not valid,
On "Save and Submit" of the timesheet, the timesheet submission is
cancelled by the eventhandler
(e.Cancel=true) and Timesheet's status changes to "Error".

On opening the timesheet again, the following error message is shown at the
bottom of page
While communicating with the Project Server an error occured. Check
connectivity with your administrator to determine if further action is
necessary. In "Manage queue" , there occurs the following job.
Job Type:Timesheet Review
Job State :Failed And Blocking Correlation

I presume that the system is trying to auto approve the cancelled timesheet.
Could you please help us to solve this problem of automatic timesheet
approval?

Thanks,
Sindia

Dale Howard [MVP] dot at dot

unread,
Mar 7, 2009, 10:37:00 AM3/7/09
to
sindia --

I would recommend you repost this question in the
microsoft.public.project.developer newsgroup, as you are more likely to get
a reply in that newsgroup. Hope this helps.

--
Dale A. Howard [MVP]
VP of Educational Services
msProjectExperts
http://www.msprojectexperts.com
http://www.projectserverexperts.com
"We write the books on Project Server"


"sindia" <sin...@discussions.microsoft.com> wrote in message
news:311BC5A9-9F42-4334...@microsoft.com...

Ashraf Shata

unread,
Aug 24, 2020, 7:02:58 AM8/24/20
to
Dear , i hope you found solution , please provide me with code if you can.
0 new messages