How to programatically insert data into resource calendar?

M

Melt16

We have a Project 2007 Server.
When an employee books leave through our custom leave system, we would like
to insert into the project resource calendar programatically that the
specific resource will not be available for those days they are on leave,.

Could someone point me to the right direction in order to achieve this?

Thanks
 
R

Rod Gill

Two options:
1) Use Project Server's PSI interface to update calendars directly in the
Enterprise Resource Pool. I think PSI has this capability, but the Project
SDK (download from microsoft.com will tell you more.

2) You can open all Enterprise Resources in Project professional to read the
data and update Resource Calendars.

If any of your Resources are local to a project then only option 2 works.
Option 1) is more of a hands off approach but much slower and more expensive
to develop. Option 2) needs to be run from a PC with Project Professional on
it.

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
M

Melt16

Hi Rod,

After downloading and reading some of the Project Server 2007 SDK, it seems
PSI is not suited for this, (unless you know otherwise)

In the documentation in the section "What the PSI does not do" it mentions....

Resources
-Requesting or performing resource leveling.
-Changing the resource on an assignment. However, you can use the PSI to
delete the assignment and create a new one.
-Deleting or replacing a resource that has actual work accepted (actuals).
-Changing a resource type between Work, Material, and Cost.
-Creating or editing resource calendars.


So is my only option now to do a direct database edit, although that is not
advised?
Apparently the calendar web service only deals with calendar exceptions.
 
J

Jonathan Sofer [MVP]

You might have already tried this but have you posted your programming
question in the project developer newsgroup yet?

Jonathan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top