Project Server 2007 Events

V

Vincenzo

I try to use the Project Server Events, but I can't change the project data
when the project is publishing because the ProjectDataSet property of the
ProjectPrePublishEventArgs object is NULL.

How can I change the project data (custom fields, resources, ...) when I
publish the project?

Thanks, Vincenzo.

------------------------------------------------------------------------------------
This is my code of the Event Handler:

using System;
using Microsoft.Office.Project.Server.Events;
using Microsoft.Office.Project.Server.Library;
using System.Text;
using System.IO;

namespace Mach1EventHandler
{
public class InsertMach1Data : ProjectEventReceiver
{
public override void OnPublishing(PSContextInfo contextInfo,
ProjectPrePublishEventArgs e)
{
e.Cancel = false;
TextWriter wr = new StreamWriter("c:\\temp\\log.txt", true);
wr.WriteLine(DateTime.Now.ToString() + " - publishing " +
e.ProjectName);
if(e.ProjectDataSet == null)
wr.WriteLine(DateTime.Now.ToString() + " - dataset: null");
else
wr.WriteLine(DateTime.Now.ToString() + " - dataset: " +
e.ProjectDataSet.DataSetName);
wr.Close();
}
}
}
 
M

Mike Glen

Hi Vincenzo ,

Try posting on the developer or server newsgroup. Please see FAQ Item: 24.
Project Newsgroups. FAQs, companion products and other useful Project
information can be seen at this web address:
http://project.mvps.org/faqs.htm

Mike Glen
Project MVP
 
M

Mike Glen

Sorry, Vincenzo (red face!) I hadn't realised I'd changed newsgroups!
Please ignore and await an answer from the experts :)

Mike Glen
Project MVP
 

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

Similar Threads

Problem whit Event Handler 0
Project Server Events 0

Top