Posts

Showing posts from March, 2010

Project Server 2007 Blogs: Application event handeling setting Project level Enterprise custom field

Project Server 2007 Blogs: Application event handeling setting Project level Enterprise custom field

Tips for Deploying ASP.Net Application in Production

Application event handeling setting Project level Enterprise custom field

Private Sub App_ProjectBeforeSave(ByVal pj As Project, ByVal SaveAsUi As Boolean, Cancel As Boolean) If pj.CurrentView = "Publish Project View" Then 'pj.Tasks.Item(1).Name = "Test View level " 'pj.ProjectStart = Now() 'pj.StatusDate = Now() 'MsgBox ("Inside view published") 'Else Dim x As String 'x = "XYZ" x = ActiveProject.ProjectSummaryTask.GetField(FieldNameToFieldConstant("- Groups", pjTask)) If x = "" Then 'confirm = MsgBox("Please go to Menu-->Project-->Project Information-->select your 'Group'", vbYesNo) confirm = MsgBox("You did not select Group,do you want to select it", vbYesNo) If confirm = 6 Then Cancel = True MsgBox ("Please go to Menu-->Project-->Project Information-->select your ' Group'") Call ActiveProject.ProjectSummaryTask.SetField(FieldNameToFieldConstant(" - Groups", p...
Application Events> using application events requires a few steps. The first step is to create a new class module and declare an object of type Application with events. Creating the class module is done by going to the insert menu and selecting "ClassModule" When you have done this, double click on the class module and declare the object by using the following code: Public WithEvents App As Application After the new object has been declared with events, it appears in the Object drop-down list box in the class module, and you can write event procedures for the new object. (When you select the new object in the Object box, the valid events for that object are listed in the Procedure drop-down list box.) Writing the procedure is similar to writing any macro. The image below shows a simple example using the ProjectBeforeTaskChange event. Note that NewVal holds the value that the user has input. The original value can still be referenced in the standard way (t.Name). The code t...