Quantcast
Channel: Project Customization and Programming forum
Viewing all 5347 articles
Browse latest View live

Project Application Events to run Ribbon Customization Code

$
0
0

Hello,

We are using Project Pro 2010 version, and have created a "Ribbon Customization Macro" (adds a ribbon button to call a macro for Project related tasks), and currently runs on "Project_Activate" event, and as it is in Project Activate event, the button is hidden (unloaded from memory) when the project is closed... which is okay, I am getting the functionality what I want, but, I would like to reduce the confusion on end user side, and see if I have any Application level event, that I can run this ribbon customization code in so it will stay as long as the Project Pro is running. 

Any ideas?

Regards,

Kishore Dodda


Kishore Dodda


Workflow problem - STAGE_INFO is DBNull

$
0
0

Hello everyone

I am facing a very frustrating issue with our workflow. Our workflow has few stages. When submitting workflow from stage 2 to stage 3 sometimes on Workflow Stage Status Project Detail Page is written "The value for column 'STAGE_INFO' in table 'WorkflowStatus' is DBNull." What is very weird is that this happens only occasionally. All activities that are defined in workflow to execute when submitting workflow from stage 2 to stage 3 are successfully executed and also workflow stops at stage 3 as it is supposed to.

Actions that are being executed when moving from stage 2 to stage 3 are: read project name, rename project set value of some custom field, send email and publish project.

Any idea why is this happening or what actions should I take resolve this problem? 

Thanks in advance

Project type custom text field is required

$
0
0

Hi everyone,

I have the requirement in project server 2010.My requirement is that,i have four project type custom text field named as T1,T2,T3,T4. Now when i associate these fields with a PDP (Project Detail Page) i want ,when i entered any value in text box T1 ,then all remaining text box T2,T3,T4 should be Required else text box T1 is empty then all remaining text box T2,T3,T4 should not be required.

Thanks..


Neeraj

Using C#, how do I programmatically change the name of a custom field in MS Project 2007.

$
0
0

Hello,

I'm developing a C# add-in for MS Project 2007 using VS 2008. I want to change the name of the custom resource field (Text1) to something more helpful to the users. I have not been able to figure that out.

I am able to return the value in the field doing this:

      private string ReturnCustomFieldValue()
        {
            MSProject.Application projApp = Globals.ThisAddIn.Application;

            string test;
            test = projApp.ActiveCell.Resource.GetField((Microsoft.Office.Interop.MSProject.PjField)Microsoft.Office.Interop.MSProject.PjCustomField.pjCustomResourceText1);
            
            return test;

        }

I recorded a macro in VBA that changes the name of the custom field, but the code generated there was drastically different than anything I've seen with the Interop library. I could not figure out how to convert it to C#.

Here's the code in VBA:

Sub Macro2()
    CustomFieldRename FieldID:=pjCustomResourceText1, NewName:="ProjConnectionResourceID"
End Sub

Thank you for the help.

~J

 

 

Editing Actuals in a Pre-existing timesheet PSI 2010

$
0
0

Hello everyone,

I am currently trying to update the TS actuals in a pre-existing timesheet that already has timesheet lines in them.  I was wondering whether this was possible via the PSI, as I have checked the forms for someone having a similar problem and it seems like no one has had success.

I need to know whether or not it is possible to load a pre-existing timesheet into the timesheet object and then edit the actuals in a line based on the TSLUID, then send it into the queue via TimesheetLineUpdate method.

I have tried following a previous thread for a person who had a similar question, and I ended up with the same exact problems as well.

http://social.msdn.microsoft.com/Forums/en-AU/project2010custprog/thread/59b5ca3b-8fd2-488d-aded-52502e23a74d

I was wondering whether anyone has successfully done this?

We are using Project Server 2010 PSI, to programmatically edit the actual of a timesheet line within a timesheet.  

OwnerResourceNameUID foreign key table

$
0
0

Found this foreign key within the MSP_Timesheet table.  I was wondering what table this foreign key belongs to.  

It doesnt belong to resourceUID, or the resourceManagerUID either.

WinUSB unstable connection (error code 10)

$
0
0

I'm working on a project with WinUSB and PIC microcontrollers involved and I guess I'm having some trouble with the WinUSB driver.

I must tell that I don't have any driver programming background so I'm not able to find out much about the issue.

I installed the driver with a modified .inf file that seems to be OK.

The issue is that sometimes the device fails to connect and I get the code 10 error on the system manager.

I have to connect and disconnect the device's cable a couple of times to get it properly connected.

I get this issue on Windows 7 PCs but it works correctly on a Windows XP PC.

I've tried adding the .cat file,  different versions of the driver,  and I cannot get it right.

I'd be gratefull if someone could help with the issue.

Thanks in advance.

Export to Microsoft project Xml and Mpx Fomat for Microsoft Project Plan

$
0
0

I have created a custom planning application which is a windows application using C#. I want to provide a facility of Export to Mpx to the user so that the user can extract the plan from my custom application and view the same in Microsoft Project Plan.

I have all my data in form of datasets and datatables. How do I code for such a functionality. I am unable to find a standard way of doing the same.

I have downloaded the Microsoft Project SDK from the site http://msdn.microsoft.com/en-us/library/bb428843(v=office.12).aspx. The approach that I have presently used is

  • Create a dataset on the schema exposed in the SDK
  • Serialized the dataset to xml and created a XML file.

Next part would be to somehow convert the xml to mpx. Presently I am unable to get the correct xml generated. The xml file that gets generated is not loading correctly in the Microsoft Project Plan.

Also I am unable to find a way to convert the xml to mpx. I am adding the sample xml that I have been able to generate.'

<NewDataSet xmlns="http://schemas.microsoft.com/project/2007"><Project><SaveVersion>12</SaveVersion><UID>19</UID><Title>New Project Plan</Title><Subject>New Project Plan for testing Advanced Planning Functionality</Subject><ScheduleFromStart>true</ScheduleFromStart><StartDate>2012-03-01T08:00:00</StartDate><FinishDate>2012-03-02T08:00:00</FinishDate><CurrencyCode>$</CurrencyCode><DefaultTaskType>1</DefaultTaskType><DurationFormat>5</DurationFormat><EditableActualCosts>false</EditableActualCosts><HonorConstraints>true</HonorConstraints><InsertedProjectsLikeSummary>true</InsertedProjectsLikeSummary><MultipleCriticalPaths>false</MultipleCriticalPaths><NewTasksEffortDriven>true</NewTasksEffortDriven><NewTasksEstimated>true</NewTasksEstimated><SplitsInProgressTasks>true</SplitsInProgressTasks><SpreadActualCost>true</SpreadActualCost><SpreadPercentComplete>false</SpreadPercentComplete><MoveCompletedEndsBack>false</MoveCompletedEndsBack><MoveRemainingStartsBack>false</MoveRemainingStartsBack><MoveRemainingStartsForward>false</MoveRemainingStartsForward><MoveCompletedEndsForward>false</MoveCompletedEndsForward><AutoAddNewResourcesAndTasks>true</AutoAddNewResourcesAndTasks><Tasks /><Tasks /><Tasks /><Tasks /><Tasks /><Tasks /><Tasks /><Tasks /></Project><Task><UID>60</UID><ID>60</ID><Name>Basline Tracking View</Name><OutlineNumber>1</OutlineNumber><Start>2012-03-01T08:00:00</Start><Finish>2012-03-02T09:00:00</Finish><Summary>true</Summary><Critical>true</Critical><ConstraintType>0</ConstraintType></Task><Task><UID>100000000000000091</UID><ID>100000000000000091</ID><Name>UI Coding - Delete Baseline</Name><OutlineNumber>1.1</OutlineNumber><Start>2012-03-01T08:00:00</Start><Finish>2012-03-01T13:39:00</Finish><Summary>false</Summary><Critical>false</Critical><ConstraintType>0</ConstraintType></Task><Task><UID>57</UID><ID>57</ID><Name>Middle Tier Coding - Basline Tracking View</Name><OutlineNumber>1.2</OutlineNumber><Start>2012-03-01T08:00:00</Start><Finish>2012-03-01T10:30:00</Finish><Milestone>false</Milestone><Summary>false</Summary><Critical>true</Critical><ConstraintType>0</ConstraintType></Task><Task><UID>56</UID><ID>56</ID><Name>UI Coding - Baseline Tracking View</Name><OutlineNumber>1.3</OutlineNumber><Start>2012-03-01T10:30:00</Start><Finish>2012-03-01T16:30:00</Finish><Summary>false</Summary><Critical>true</Critical><ConstraintType>0</ConstraintType></Task><Task><UID>58</UID><ID>58</ID><Name>UI Coding - Change Update Baseline functionality</Name><OutlineNumber>1.4</OutlineNumber><Start>2012-03-01T10:30:00</Start><Finish>2012-03-01T13:30:00</Finish><Summary>false</Summary><Critical>false</Critical><ConstraintType>0</ConstraintType></Task><Task><UID>59</UID><ID>59</ID><Name>Peer Review - Baseline Tracking View</Name><OutlineNumber>1.5</OutlineNumber><Start>2012-03-01T16:30:00</Start><Finish>2012-03-02T09:00:00</Finish><Milestone>true</Milestone><Summary>false</Summary><Critical>true</Critical><ConstraintType>0</ConstraintType></Task><Task><UID>61</UID><ID>61</ID><Name>WBS View</Name><OutlineNumber>2</OutlineNumber><Start>2012-03-01T08:00:00</Start><Finish>2012-03-01T12:00:00</Finish><Summary>true</Summary><Critical>false</Critical><ConstraintType>0</ConstraintType></Task><Task><UID>62</UID><ID>62</ID><Name>UI Coding - WBS View</Name><OutlineNumber>2.1</OutlineNumber><Start>2012-03-01T08:00:00</Start><Finish>2012-03-01T12:00:00</Finish><Summary>false</Summary><Critical>false</Critical><ConstraintType>0</ConstraintType></Task></NewDataSet>
 

Can someone please help me to achieve an export to xml first and then export to xml?

Thanks,

Vandana

 


Create a MPX file for import to MS Project, with multiple task predecessors (>1 predecessor)

$
0
0

I have created MPX files from an excel sheet, and am using MS Project as a viewing tool.
Everything works fine except for one thing: How to import tasks which have >1 predecessor?

* I have tried imports using "successor" instead of predecessor
* When exporting tasks (save as) from MS Project tasks with multiple predecessors are saved as:   70; ... ;"14FS+0d;16FF+0d"; ...
   but I am unable to use "...;..." as an escape sequence to include the ; character to delimit within the "predecessors" field.
* I have tried using ;  ,  #  as delimiter character for the MPX file (specified on the very first row of the MPX file at the fourth character position)
   but that doesn't help either.

Would be very grateful for assistance on this!

The sample I think ought to work, but yields an error message when launching it in MS Project is:

MPX; MS Project 3.0
...
61;3;1;70
...
70;1;The first master task
70;2;Subtask one
70;2;Subtask two;2FS+0d
70;2;Subtask three;"2FS+0d;3FF+0d"

request a Help

$
0
0

Hi

Im in problem with this code ,Pleas Help me

SqlConnection con =newSqlConnection();

SqlCommand com =newSqlCommand();

con.ConnectionString =

"Data Source=MADI-HP;Initial Catalog=Ba;Persist Security Info=True;User ID=sa;password=vahid_madi1359";

com.Connection = con;

con.Open();

string strSql1;

/*strSql1 ="SELECT count(*) FROM UsertaTable WHERE Username='+txt_username.Text+' and pass='+txt_password.Text+'";*/

strSql1 =

"SELECT[Username],[Pass] FROM [Herasat].[dbo].[UsertaTable] WHERE Username='+txt_username.Text+' and pass='+txt_password.Text+'";

SqlCommand mycmd=newSqlCommand();

mycmd.Connection = con;

mycmd.CommandText = strCon;

SqlDataAdapter da =newSqlDataAdapter();

da.SelectCommand= mycmd;

DataTable dt =newDataTable();

da.Fill(ds,

"UsertaTable");It doesent work.

Information in order to create a Project Server Report

$
0
0

Hi everyone,

Regarding the ProjectServer_Reporting database I have been this table: MSP_WssRelationshipType

RelationshipTypeID

Description

0

Link from issue to affected task

1

Link from issue to resolving task

2

Link from issue to other task

3

Link from issue to other risk

4

Link from issue to other issue

5

Link from risk to impacted task

6

Link from risk to triggering task

7

Link from risk to mitigating task

8

Link from risk to contingent task

9

Link from risk to other risk

10

Link from risk to other issue

11

Link from deliverable to providing task

12

Link from deliverable to consumer task

13

Link from deliverable to providing   project

14

Link from deliverable to consumer project

What I knew are the risks, issues and deliverable but not these --> {affected task, impacted task and resolve task} About these three categories of tasks...I am not aware of them.

Have they logic by if alone? Or do they reflect the type of relation between the task and {issue, risk, deliverable}?

I would like to get more information about these tables...

Where might it find more information or detail of these tables?

Thanks in advance for your responses!!

best regards,

Pedrof.-


Pedrof.-

AssignmentUidInvalid Error on UpdateStatus()

$
0
0

Hello,

we want to update actual work via statusing.UpdateStatus(changeXML) for specific assignments.

For this purpose we built a changeXML that includes ResID (equally ResUID of assignment owner) and call UpdateStatus with this changeXML. Now, everything goes fine for administrators, i.e. they can update the status and submit it to project afterwards for themselves or other resources. Just for some other users (which do possess the StatusBrokerPermission) we get an "AssignmentUIDInvalid" exception. But the assignment UID is valid, ie. there are in fact assignments with that UID. 

My guess is, that the AssignmentUIDInvalid exception just wrapped some other problem which I can't figure out. Maybe it's a permission problem? 

Would be great if you have some advice how to track down this issue. As the source code of the PSI implementation is not made public I don't know what could have caused this error, but my instinct tells me that it has nothing to do with our code - it still works fine for administrator users.

Thank you very much, Tom

PWA Ribbon: How to get checkbox value

$
0
0

Hello community,

I am currently working on the ribbon in an application page (SharePoint solution). I added a checkbox inside the ribbon. But now, I need to get the value of this checkbox in my JavaScript code.

Here's my code:

Elements.xml (representing the ribbon customization):

<Controls Id="Dpc2013.Ribbon.ViewGroup.Controls"><CheckBox Id="Dpc2013.Ribbon.ViewGroup.HierarchicalView"
    Command="Dpc2013.Ribbon.Command.ShowHierarchicalView"
    Sequence="53"
    LabelText="Show Detailed View"
    ToolTipTitle="Show Detailed View"
    TemplateAlias="c1"/></Controls>

  ...

  <CommandUIHandlers><CommandUIHandler
      Command="Teamsquare.Dpc2013.Ribbon.Command.ShowHierarchicalView"
      CommandAction="javascript:GM.ToggleMode(this);" /></CommandUIHandlers>

And here's my JS code :

this.ToggleMode = function (obj) {

	var mode = obj.checked == true ? 1 : 0;

	// Send the sorting values to the server by using a callback.
	var args = Sys.Serialization.JavaScriptSerializer.serialize({
		Command: commands.GetData,
		DisplayMode: mode
	});

	eval(callbacks.displayCallback);
}

The 'mode' variable should be set with the value of the checkbox defined in the ribbon, but how can I get its value??

Cheers !

Filtering in JSGrid control

$
0
0

I’ve been trying to add a filtering feature on the JSGrid control for a few days, but there is so little documentation on it (especially for the client side) that I can hardly figure out how it works.

I have the following JavaScript code, but I have no idea how to implement the delegates methods. Moreover, the following code doesn’t work and returns an error.

If you have any idea, or any documentation on this, please share!

Type.registerNamespace("GridManager");

GridManager = function () {

…

 

       this.Init = function (jsGridControl, initialData, props) {

              this.JSGridControl = jsGridControl;

              this.Properties = props;

 

              // Initialise the delegates (sorting, filtering, etc).

              this.InitDelegates();

 

              // get the initial data.

              var args = Sys.Serialization.JavaScriptSerializer.serialize({

                     Command: commands.GetData,

                     DisplayMode: GM.Properties.displayMode

              });

 

              // Client calls the display callback.

              eval(callbacks.displayCallback);

 

       }

       this.InitDelegates = function () {

              // Delegates to handle filtering.

              this.JSGridControl.SetDelegate(SP.JsGrid.DelegateType.LaunchFilterDialog, HandleDelegate_LaunchFilterDialog);

              this.JSGridControl.SetDelegate(SP.JsGrid.DelegateType.GetAutoFilterEntries, HandleDelegate_GetAutoFilterEntries);

              this.JSGridControl.SetDelegate(SP.JsGrid.DelegateType.AutoFilter, HandleDelegate_AutoFilter);

       }

 

…

 

       function HandleDelegate_LaunchFilterDialog(columnKey) {

 

              alert("HandleDelegate_LaunchFilterDialog called");

 

       }

       function HandleDelegate_GetAutoFilterEntries(currentAutoFilterState, initiatingColumnKey, columnKeys, fnSuccess, fnFailure) {

              fnSuccess(columnKeys);

       }

       function HandleDelegate_AutoFilter(newState) {

 

              _filter = newState;

              _jsGridControl.Disable();

              var args = Sys.Serialization.JavaScriptSerializer.serialize({

                     Command: "Filter",

                     FilterField: _filter[0].columnName,

                     FilterValue: _filter[0],

                     FilterOp: "Eq"

              });

 

              // Ajax Call with ‘args’ as argument.

              eval(callbacks.filterCallback);

 

       }

…

}

Thanks a lot

Userforms Not Saving and Disappearing

$
0
0

Hi All - apologies for the length.

Project 2010 (14.0.6023.1000) Standard SP1 MSO (14.0.6129.5000), running in Windows XP Professional SP3.

I have been having problems with UserForms in my global file - occassionally disappearing or becoming otherwise inaccessible ("File not found" errors and "Automation Errors"). I initially thought I had some sort of corruption in the global file itself, so exported everything and rebult the file from scratch multiple times, but the errors kept appearing intermittently.

While most of the behaviour is intermittent, and therefore can't be reliably reproduced, I've isolated some reproduction steps which cause issues to recur - and this happens on a blank global file, with nothing in it.

So far I've tried:

  • Deleting the global file, forcing MSP to create a blank one
  • Deleting all Ribbon/Quick Access customisations (wasn't hopeful on that one, but wanted to rule it out)
  • Repairing my installation of MS Project and restarting the workstation

But all to no avail.

The following steps are reproduce the issue 100% on my workstation - I'd be grateful if anyone else could also reproduce:

Issue A - User Form Changes not Persisting

  1. Delete the existing global file from [Profile]\Application Data\Microsoft\MS Project\14\1033\Global.MPT
  2. Open MS Project
  3. Open the VB Editor (View > Macros > Visual Basic)
  4. Right click on ProjectGlobal (Global.MPT) and select Insert > Userform
  5. Close the userform that just appeared (UserForm1)
  6. Reopen the userform and make a change (i.e. change the caption to "UserForm1234")
  7. Click the Save button on the VBE toolbar
  8. Close and reopen the userform

    RESULT: The change made in step 6 does not persist. It has reverted back to its original state.

Issue B - '' could not be loaded
Continuing on from the scenario above:

  1. Right click on ProjectGlobal (Global.MPT) and select Insert > Userform
  2. Close the userform that just appeared (UserForm2), and the form behind (UserForm1)
  3. Reopen the userform (UserForm2)
  4. Change the form name, e.g. from "UserForm2" to "UserForm2345"
  5. Click the Save button on the toolbar
  6. Close and reopen the userform

    RESULT: Error message displayed - '' could not be be loaded.
    The form now can't be opened or exported

Issue C - File not found
Continuing on from the scenario above:

  1. Right click on ProjectGlobal (Global.MPT) and select Insert > Userform
  2. Click the Save button on the VBE toolbar
  3. Close the userform that just appeared
  4. Reopen the userform (UserForm2)
  5. Shorten the form caption from "UserForm2" to "UserForm2468"
  6. Click the Save button on the toolbar
  7. Close and reopen the UserForm2

    RESULT:
    Error message displayed - File not Found

Issue D - Application Crash without Error, Corrupting Global
Continuing on from the scenario above:

  1. Open UserForm2345
  2. Open UserForm2

    RESULT: The MSP and VBE applications close immediately without giving an error
  3. Reopen MS Project
  4. Reopen the Visual Basic Editor

    RESULT: Error message stating Errors occurred during load.


    The ProjectGlobal is now named
    with the full path to the Global, and contains none of the forms created in the previous steps:

Run QueuePublish and QueueCheckIn Method from workflow using ASMX service - authentication error

$
0
0

Hi

I need to update custom field from workflow so using UpdateProjectProperty which needs QueuePublish and QueueCheckIn Methods to be called from workflow for updation.

I have add web reference of ProjectServerServices.dll into my solution and added following code for authentication before QueuePublish

project.UseDefaultCredentials = true;
project.Credentials = System.Net.CredentialCache.DefaultCredentials;
project.QueuePublish(jobId, projectuid, true, String.Empty);

I am getting error as

The request failed with HTTP status 401: Unauthorized.

Can somebody help me out with some sample code for authentication needed for using PSI with workflow in asmx service?


Project Server 2010, assign a task to a team

$
0
0

Hi All,

One of my Project Manager is creating a single task where 60-70 users are going to work on it.

Is there any option in Project Server 2010, where i can create a group/team, so that PM can select one team/group in MPP, on publishing it will assing the tasks to all the users in that group/team.

Please suggest, this is very critical in running our Business.

Thanks



Thanks & Regards
Ravishankar Polepalli (MCP,MCC)
Microsoft Dynamics, Project Server and SharePoint Server Consultant
ravi.polepalli@gmail.com

Is there a way to limit what EPTs can be seen when creating a new project

$
0
0

Good afternoon,

I have a request to limit what a user sees when he clicks on "New" in the Project Center. There is a dropdown list which shows several types of projects. Is there a way to control that? We want the users to see some but not all. We also want administrators to see all types.

Thank you,

Jack


Thanks, Jack

Project Server 2010: AssignmentUIDInvalid on UpdateStatus()

$
0
0

Hello,

we want to update actual work via statusing.UpdateStatus(changeXML) for specific assignments.

For this purpose we built a changeXML that includes ResID (equally ResUID of assignment owner) and call UpdateStatus with this changeXML. Now, everything goes fine for administrators, i.e. they can update the status and submit it to project afterwards for themselves or other resources. Just for some other users (which do possess the StatusBrokerPermission) we get an "AssignmentUIDInvalid" exception. But the assignment UID is valid, ie. there are in fact assignments with that UID. 

My guess is, that the AssignmentUIDInvalid exception just wrapped some other problem which I can't figure out. 

Then I tried the same changeXML with the ChangeXML utility from Project SDK 2010 which gave me the same error. The ResID equals the assignment owner which is in this case equal to the uid of the assigned resource. But this resource is not shown in the list of resources I can make status updates for in the ChangeXML utility, it is an enterprise resource that cannot logon to PWA. 

Today, I digged a bit deeper, ran SQL Profiler on the database system.

There I saw that the PSI executes the stored proc "MSP_DATAEDIT_GET_ASSIGNMENTSAVED_DATA" of the project draft database, but with the given proj and assignment uid this yields no rows in return. If we execute MSP_DATAEDIT_GET_ASSIGNMENT_DATA, we get the correct assignment. So there must be some corruption between the two table MSP_ASSIGNMENTS_SAVED and MSP_ASSIGNMENTS. But those tables are not documented in any way. So what could the problem be? It is obviously not a permission problem.

Thank you, Tom

Customizing Dialogbox for import outlook tasks in project 2003

$
0
0

HI

I am stucked with Project 2003. Maybe somebody can help me here.
It is possible to import Outlook-Tasks to Project. This is done via the so called sync funtion in Project under extras - import outlook tasks.
My question is, as soon as I import Outlook tasks  a Dialogbox appears with ALL Tasks currently in my Tasksfolder in outlook.- So far so good.
What I want is that only specific Tasks appear, which are located in a specific Tasksfolder.
I did the following. I created a Tasksfolder(Project) in Outlook and via a VBA Script Tasks with specific wording in the Header are moved to that location. - Works perfectly.
If I open Project and start the import I can see the Folder(Project) with the tasks, but I also see all other folders and tasks. I dont want that.
I only want to see the Tasksfolder(Project) with the Tasks in that folder. - Filtertype?

Is there anyway to customize this Dialogbox using filters or not?
Is there maybe somebody that solved a problem like that?
Maybe with VBA Code?

Viewing all 5347 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>