I thought this was one worth mentioning to a wider audience in case it catches others out. One of our customer had written some code to update data in the timesheet using the PSI. All seemed to be working OK, but no numbers changed. You could even debug in Visual Studio and use the cool data visualizer to see the dataset and watch the changes - but even though the call worked and the queue showed a successful update the timesheet didn't reflect the changes. The right dataset was also being passed to the final web service - in this case the QueueUpdateTimesheet method of the Timesheet web service.
I then noticed that the customer had an ADO.NET "AcceptChanges" call on the dataset before the call to the web service. This was breaking the update as the web service is expecting the dataset to have a delta holding the changes from the original read of the timehseet dataset. The AcceptChanges is used in ADO.NET to commit changes in the dataset - but the delta then disappears. So even though the dataset was different to that originally read from the PSI call, it didn't have the deltas - so no changes were made to the original (different) data. Simply removing this line got everything working again and the changes were then visible in the timesheet control of PWA!
Technorati Tags: Project Server 2007
An option, and maybe more correct, is access enterprise calendar to retrieve hours per day but I think that calendar information is just binary data and I can't find a way to read that information.
Can you help me?
Hi Brian, one more time!
I'm having problems with calendars because I want to read some information to make an integration with a human resource software.
You know how to read that information or a place were some one can help me?
Thks one more time
There isn't a way to crack the binary for calendar information. You may be able to do something via VBA in the client, and then push the data into a more readable format, but I haven't tried this.
Are you saying that we cannot access any calendar information programatically?
That's a huge flaw in my opinion...
You can access the calendar exceptions Nuno - just you can't tell what they are exceptions from... And I don't disagree with you.
Hi Brian one more time!
I have made a standalone windows form application and I want to make acessible from an activex.
When a user acess to an option on pwa an alert will ask user to download the application.
You know any tutorial with that type of informations?
I've been looking all over the net and SDK's but can't find out how to insert items into a resource calendar programatically.
Basically we have a leave system, when someone books leave, we'd like to update the resource calendar and make that resource as not available for the time period in which they are on leave.
A code sample or some help on this will be great.
Hi Greg, I don't have a code sample to hand but can give some quick pointers. When entering non-working time through the timesheet then this goes into the resources calendar as a calendar exception. So doing this programmatically is one option. Also this note is from the SDK about the Calendars web service:
The UpdateCalendars method supports only calendar exceptions for enterprise calendars, not all enterprise calendar functionality in Microsoft Office Project Server 2007. You can add or delete time off for Project Server resources as calendar exceptions by using the [Resource Web service] namespace.
This method does not modify enterprise calendar exceptions. If updates are required, you must delete and recreate calendar exceptions.
Work weeks in enterprise calendars are not normalized in the Published database. Work week information is stored as binary data, so there are no direct queries available to load all calendar information to a CalendarDataSet.
So the Resource web service is probably the best way to go.
I dont that my comment is much related to this topic but im hitting a dead ends , i want to create Material resources and i want to set the standard rate for this resource or i want to loop through the resources i already have and update the standard rate for them ,i tried to look for the property RES_Cost or RES_StandardRate but i found nothing can you help me with this please .
I wish to understand if we could integrate Hyperion with Project server 2007 for time management. Client wants to use Hyperion for time management and import export within these systems. my email id is firstname.lastname@example.org
Anyone know of the proper way to edit Resource Plan assignments using the PSI?
I can retrieve the resource plan using something like this:
ResourcePlanDataSet resplans = planService.ReadResourcePlan(String.Empty,
new Guid(e.CommandArgument.ToString()), DateTime.Now, DateTime.Now.AddMonths(1), (short)TimeScaleClass.TimeScale.Days, true, false);
But question #1: what is the proper way to access the actual assignments? I can find the assignments in this array: resplans.PlanResources.ItemArray (first resource), but is this the only way?
Question #2: what if I want to update the values? Making changes to the values in ItemArray doesn't work.. nothing gets changed and nothing changes when looking at the object in the data visualizer.
Best regards :)
I had the exact same problem with the RemoveCalendarExceptionsRow method and finally worked out a solution for it, i created a small blogpost about it here if you (and others) are interested:
--i´m trying to delete a CalendarExceptionsRow from the ResourceDataSet.CalendarExceptions table. But the
--RemoveCalendarExceptionsRow() and Delete() methods don´t work for me.