none
when do the various server side events fire

    Pertanyaan

  • Does documentation exist as to the different server side events? I haven't been able to find it in the SDK or elsewhere... For example, what is the difference between Added and Created? Also, what's the difference between Saved and updated?

    Also, the documentation (http://msdn.microsoft.com/en-us/library/microsoft.office.project.server.events.projecteventreceiver.onsaved%28v=office.12%29.aspx) says that onSaved fires "when Microsoft Office Project Professional or any of the Project methods (CreateProjectFromTemplate, QueueAddToProject, QueueCreateProject, and so forth) saves to the Draft database". However, my event handler runs fine for the second or following save for a given project, but does not fire the first time.

    Steps to reproduce:

    1. in project pro, create a new project and type in some tasks

    2. click save

    At this point, my onSave event handler does not fire. Nothing in the logs; no errors in the queue.

    3. add or change a task

    4. click save again

    At this point, my onSave handler fires and runs fine.

    Thanks,


    Mike G.

    Rabu, 23 Mei 2012 14.28

Jawaban

  • Hi Mike,

    As far as I have seen there is no clear article on each events & how intrenally it works but based on the work on server side events, I would say that two types of server side events in Project Server  like Pre-events and Post-events. Save/publish/project create & other jobs are asynchronous.
    For example: Added and Created, means a jobs is added to the queue & Created may be the project create job is completed.
    Saved The event fired a saved job which is completed ..

    Please see the article by Brian

    http://blogs.msdn.com/b/brismith/archive/2007/07/04/when-are-server-side-events-supposed-to-fire.aspx

    More info:

    http://msepm.hsquared.be/?p=13

    First time, On created will fire & on each save, if the data is changed, Update event will fire.


    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”. Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82

    • Ditandai sebagai Jawaban oleh m g Kamis, 24 Mei 2012 12.11
    Kamis, 24 Mei 2012 06.47

Semua Balasan

  • I would expect that the first time the OnCreated event fires. The creation is likely postponed until the very first save.

    Jan Cirpka

    Kamis, 24 Mei 2012 05.31
  • Hi Mike,

    As far as I have seen there is no clear article on each events & how intrenally it works but based on the work on server side events, I would say that two types of server side events in Project Server  like Pre-events and Post-events. Save/publish/project create & other jobs are asynchronous.
    For example: Added and Created, means a jobs is added to the queue & Created may be the project create job is completed.
    Saved The event fired a saved job which is completed ..

    Please see the article by Brian

    http://blogs.msdn.com/b/brismith/archive/2007/07/04/when-are-server-side-events-supposed-to-fire.aspx

    More info:

    http://msepm.hsquared.be/?p=13

    First time, On created will fire & on each save, if the data is changed, Update event will fire.


    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”. Thanks, Amit Khare |EPM Consultant| Blog: http://amitkhare82.blogspot.com http://www.linkedin.com/in/amitkhare82

    • Ditandai sebagai Jawaban oleh m g Kamis, 24 Mei 2012 12.11
    Kamis, 24 Mei 2012 06.47
  • Thanks!

    Mike G.

    Kamis, 24 Mei 2012 12.11
  • Hi Amit,

    Any Idea which event would fire when I change data in MPP for a Project?

    Regards,

    Agasthya


    agasthya

    Selasa, 05 Juni 2018 05.59
  • Hi Agasthya,

    If you are making a change in Project Task, try using the MS Project's ProjectBeforeTaskChange2 event that triggers before the user changes the value of a task field. 

    https://msdn.microsoft.com/en-us/vba/project-vba/articles/application-projectbeforetaskchange2-event-project 

    Please note that The ProjectBeforeTaskChange2 event doesn't occur on some conditions such as timescaled data change or when a task is split by manipulating its task bar on the Gantt Chart. 

    You may also use Project.Change Event which occurs when a change is made to data in the project. 

    This depends based on what exactly you're trying to achieve. 

    Hope that helps.

    Thanks, 
    Amit 


    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”. Thanks, Amit Khare |Director- PPM Consulting and Managed Services| Blog: http://ppm365.blogspot.com/ LI: http://www.linkedin.com/in/amitkhare82

    Selasa, 05 Juni 2018 13.38
  • Hi Amit,

    I actually need to use the Project Server Event Handlers to detect the project updates in MPP but not VBA Macros or VSTO Add-ins.

    Few Events like OnPublishing,OnPublished,OnCheckin trigger from MPP but I the OnUpdating, OnupdatingScheduledProject or OnUpdatingPwaProject do not trigger from MPP.

    Any idea which event I can use for detecting the project updates from MPP using Events Halders (PSI or CSOM)

    Regards

    Agasthya


    agasthya

    Rabu, 06 Juni 2018 04.46
  • Hi Agasthya,

    Did you try to use pre-event handler ProjectEventReceiver.OnUpdatingScheduledProject method?

    Thanks, Amit 


    If you found this post helpful, please “Vote as Helpful”. If it answered your question, please “Mark as Answer”. Thanks, Amit Khare |Director- PPM Consulting and Managed Services| Blog: http://ppm365.blogspot.com/ LI: http://www.linkedin.com/in/amitkhare82

    Jumat, 08 Juni 2018 17.42
  • Hi Amit,

    I tried using the 'OnUpdatingScheduleProject' but even this event doesn't trigger from MPP.

    I updated the tasks duration, Resource, dates & also task name but this event never fired.

    Any Idea when does this event fire? Is there any documentation about this event available which you can share with me? 

    Currently I am working on Project server 2016.

    Regards,

    Agasthya


    agasthya


    Senin, 11 Juni 2018 07.08