BeforeSave event and mandatory fields check

V

Vadim Roulnov

Hi all,

All tasks in all projects on out project server have EnterpriseOutlineCode1
set mandatory. When a project is being saved MSProjectPro checks that all
mandatory fileds and outline codes are filled in with proper values and do
not let the project to be saved until they are not. To make life easier I
wanted to use Project_BeforeSave event so set default value:

Private Sub Project_BeforeSave(ByVal pj As Project)
Dim t As Task
For Each t In pj.Tasks
If Not t Is Nothing And Not t.ExternalTask Then
If t.EnterpriseOutlineCode1 = "" Then t.EnterpriseOutlineCode1
= "Other"
End If
Next t
End Sub

And what? MSProjectPro checks mandatory fields BEFORE this event occures and
the code above is executed. It is rather stupid IMHO, but which way could
this code be executed earlier than MSProject's mandatory field check?

Thank you.

-Vadim
 

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


Top