Project Programmability

This blog focuses on customizations and programming for Project Web App, Project Server, Project Professional and Project Standard. Includes User Interface (UI) customizations, Project Server Interface (PSI) and Visual Basic for Applications (VBA) Programming. It also covers Business Intelligence.
 
 

  • Project Programmability and Business Intelligence

    Registering with Project Server Events

    • 0 Comments

    As I am sure many of you are aware that Project Server provides an event infrastructure that developers can create their own events for key pre and post events that occur on the server. Mike Shughrue from the Project's Center of Excellence has provided the attached sample code that is a great example on how to register events and how to create event handlers. I use this tool to register my events opposed to using the UI on the server.

    For more information about events, check out the following SDK articles:

    Chris Boyd

  • Project Programmability and Business Intelligence

    My VBA macro from Project 2007 doesn't work in Project 2010!

    • 0 Comments

    If you have a VBA macro that worked in Project 2007 and doesn't work in Project 2010, here are some things to try.

    There are quite a few members from Project 2007 that are deprecated and hidden in Project 2010. Some of the hidden members still work as they did in Project 2007, some simply do nothing, and using some directly results in an error. If the macro relies on a hidden member that does not work the same way in Project 2010, you can get a variety of errors. For example, the Application.AnswerWizard property and the Office.AswerWizard object are both hidden -- and the AnswerWizard no longer exists. The following macro results in a run-time error 1004 in Project 2010:

    Sub GetAnswerWizard()
        Dim aw As Office.AnswerWizard
        Set aw = Application.AnswerWizard
    End Sub

     To see the hidden members, go the VBE, press F2 for the Object Browser, right-click in the Members pane, and then click Show Hidden Members. The hidden members are in a light gray font. VBA Help does not include documentation of hidden members.

    Check the macro for members that are hidden in Project 2010, and get documentation for any of those from Project 2007 VBA Help on MSDN. Then set a breakpoint to see whether the member does what is expected.

    If the macro does not use any hidden members, trace through the macro by using breakpoints, to see what is going on. Some members in Project 2010 have additional parameters. For example, if you specify a parameter by position, such as Method(,,,"Value"), the parameter could be in the wrong order. When you use only a few parameters in a method that has many, is often best to use named parameters, for example, Method MyParam:="Value".

    Note: The September update of the Project 2010 SDK includes an update of the Project 2010 VBA Help file for local use.

  • Project Programmability and Business Intelligence

    Project Workspace Sync Release to CodePlex

    • 0 Comments

    Hello,

    Last year I shared a couple of samples that showed how to sync the membership for the Project Workspace and how to trigger a RDB queue job for the issue, risks and deliverables in the Project Workspaces:

    These samples seem to be popular. As a result, I have combined the two into a single application called Project Workspace Sync and released it to CodePlex:

    Chris Boyd

  • Project Programmability and Business Intelligence

    New Technical Article: "Importing Project 2007 Tasks from Excel Using a Managed Code Add-In"

    • 1 Comments

    Jim has just posted a new technical article. Here are some details he sent me: 

     

    The article "Importing Project 2007 Tasks from Excel Using a Managed Code Add-In" is now published in the Technical Articles section of the Project 2007 SDK.

     

    Article URL:

    http://msdn2.microsoft.com/en-us/library/bb738433.aspx 

     

    Associated download:

    http://www.microsoft.com/downloads/details.aspx?familyid=416b606a-88c8-496f-9ad3-9afa09780e12&displaylang=en 

     

    The article:

      -- Explains how to develop a Project add-in that integrates with Excel, using Visual Studio 2008

      -- Summarizes the differences between C# and VB development for add-ins

      -- Includes extensive C# and Visual Basic code examples

      -- Explains examples of routines that validate and convert subsets of Excel task data for import

      -- Handles multiple task predecessors

      -- Shows a way to handle task predecessors that would create COM exceptions
      -- Shows how to configure ClickOnce for deployment of the add-in

     

    The download includes the complete C# and Visual Basic.NET code. Visual Studio Tools for Office (3.0), in Visual Studio 2008 (Beta 2), now includes templates for Project 2003 and Project 2007 add-ins. The new templates and ClickOnce publishing make it *much* easier to develop, deploy, and update add-ins for all Office applications.

     

    You can download the Beta 2 release of Visual Studio 2008 from http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx.

  • Project Programmability and Business Intelligence

    Project Server 2007 - Project Server Developer Community Expanding

    • 1 Comments

    Leveraging the development aspects of Project Server 2007 spans a wide range of skills.  PWA customizations (ASP.NET), workflow development, line of business applications integration using the PSI, extending Project Server functionality using server side events, specialized reporting from the Project Server databases and experience using VSTO are all areas of discussion. 

    The Project Server Product Group currently supports these efforts through channels such as the this Blog, Project Support WebLog, Project.Server Discussion, Project.Developer Discussion, and the Project 2007 Team Blog.

    To streamline and augment the existing efforts, we are seeking developers to join the already established Project.Developer Discussion Group

    By joining we invite you to share and discover knowledge about Project Server 2007's highly extensible out-of-the-box developer's platform, access Project Server Developer best practices, utilize a technical window back to the MS Project Server Development Group, and take part in several specialized webcasts on Development topics coming up in the next couple months.

    To identify yourself as someone that would like to join the Development Community, please contact Joyce Bileau, v-joyceb@microsoft for more information.

    To join, go to http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.project.developer

  • Project Programmability and Business Intelligence

    MSDN Webcast: PSI Programming Overview, Demos and Q&A

    • 2 Comments

    This is a little late, I missed that I didn’t post this.  Q&A and demos from the March 12th webcast.

    Question Answer
    Microsoft has BPOS (Business Productivity Online Services) which includes hosted Outlook and Hosted SharePoint, can SharePoint Server be installed on premise with its SharePoint components in BPOS and can the user extend this configuration using the things you are showing in this series? Project Server is not hosted in the BPOS. We are looking into this for the next release of Project Server
    Could you please send the link for good documentation on registering project server events in a farm environment. An event is failing in a farm environment but working in a single server environment The SDK has good documentation on registering events.  But there is one little detail that doesn’t jump out in the documentation, I’m not even positive it’s in there.  Events are registered with SharePoint, so when you scale out the information is in the config database and goes to all servers in the farm.  What doesn’t happen is the binary is not copied to each machine in the farm, you have to do that manually.
    Why don't I have the option of add Microsoft.office.project.server in the using? I added reference to Microsoft.office. The Project Server assemblies are deeper than Microsoft.Office.  Assemblies you would typically add then reference via “Using” when working with Project Server would be:
    Microsoft.Office.Project.Schema
    Microsoft.Office.Project.Server.Library
    Microsoft.Office.Project.Server.Events.Receivers
    So does the SDK tell me or instruct me as to what prerequistists have to exist in order to be able to use the PSI? meaning, do I have to be developing on the box that has PServer installed? or can I simply reference a few dll's pointing my uri to the project dev environment? Yeah there is a pretty good overview:
    http://msdn.microsoft.com/en-us/library/bb456485.aspx.

    The way I develop is with a client machine and a VM (with Project Server installed).  I go into the VM and run this command:
    regsvr32 /u C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\shfusion.dll
    That allows you to look at the GAC as files.  Then I copy everything that has Microsoft.Office to my client machine.  I tend to work with all the different Office products so I pull a lot of stuff I don’t necessarily need.  Once I have the files on my client machine, then I register them in the GAC.  Remember if you apply a service pack to your VM you’ll need to grab the files again.
    Oh and remove the /u from the above command and rerun to get the files system back to normal.
    Most of the samples of PSI I have seen are developed using c#, not much on VB. Do you recommend to use C# over VB? VB.Net is just as good for this as C#.  Actually any .NET language will work great.  I “cut my teeth” in C.  So my natural progression was from C to C++ to C#.
    Hi, Resource demo...did I understand correctly? You read DS of all resources, check out and update one, and send "whole' DS back across web services for one resource update? I read the DS for one resource, check it out, then send the complete dataset for the single resource back.
  • Project Programmability and Business Intelligence

    MSDN Webcast: Building Integrated Applications on the Project Server 2010 Platform (Level 300)

    • 0 Comments

    It is our pleasure to host Catalin Olteanu, Chief Product and Technology Officer, UMT and former Principal Development Lead for Microsoft Project to talk about extending Microsoft Project 2010!

    Webcast Description:

    Now that Microsoft Project Server 2010 is built on Microsoft SharePoint Server 2010, developers can take advantage of a rich platform and familiar tools to effectively build integrated applications and provide customers with shrink-wrapped solutions to common problems. Join Catalin Olteanu to hear lessons learned from developing UMT Project Financial Server 2010 in parallel with the Project 2010 release cycle.
    Project Financial Server 2010 is a complex, three-tier application that seamlessly integrates with Project Server 2010 and extends many of the out-of-the box components including demand management, the ribbon, the queue service, permissions, web parts, and the reporting infrastructure.

    Date:

    Starts: Tuesday, September 20, 2011 8:00 AM
    Time zone: (GMT-08:00) Pacific Time (US & Canada)
    Duration: 1 hour(s)

    Register for Event today!

  • Project Programmability and Business Intelligence

    ANNOUNCING: Demand Management Center for Project 2010 now live!

    • 0 Comments

     

    For simple information discovery - we have just published a Project 2010 Demand Management resource center that centralizes all information around Demand Management and Portfolio Strategy into one single location.

     

    Many of included links include pure developer resources. We have decided not to fragment the resources between TechNet and MSDN – that’s why you might find also developer-related link to MSDN content in the above TechCenters.

    Details

    This new resource center is the third dedicated resource center for Project 2010 – the full list below:

     

    ·        Demand Management for Project 2010 - http://go.microsoft.com/?linkid=9739874

    ·        Business Intelligence for Project 2010 - http://go.microsoft.com/?linkid=9726143

    ·        Upgrade and Migration to Project 2010 - http://go.microsoft.com/?linkid=9676814

     

    These centers are part of the Project Server 2010 TechNet TechCenter http://technet.microsoft.com/projectserver/ee263909.aspx and their concept is to collect relevant information in one place and to give end-to-end information from getting started quickly to deep dive.

     

    Q&A

    Q: Do I have to have a special product of flavor of Project Server 2010 to get the Demand Management and Portfolio Strategy functionality?

    A: All you need to have is Project Server 2010 – all included ready when you need it. You are probably referring to the 2007 release and Project Portfolio Server 2007 that was a standalone product used in conjunction with Project Server 2007 to manage full project life-cycle from initiation through selection to planning and managing the project.

     

    Q: I’m using the Project Portfolio Server 2007. Is there any migration path to Project Server 2010?

    A: Yes – there is. Please  visit the Upgrade and Migration to Project 2010 - http://go.microsoft.com/?linkid=9676814 that has a whole section dedicated to migrating from Portfolio Server 2007.

     

    Q: I’m a developer, what’s in there for me?

    A: Many of included links include pure developer resources. We have decided not to fragment the resources between TechNet and MSDN – that’s why you might find also developer-related link to MSDN content in the above TechCenters.

     

  • Project Programmability and Business Intelligence

    Do you EPMU?

    • 3 Comments

    Microsoft EPM University offers a comprehensive 4 to 5 days educational package for customers and partners who want to quickly ramp-up with EPM solution via rich instructor led online experience.

    The courses are designed to build and enhance the required knowledge to successfully plan, deploy, configure and extend Microsoft Office EPM solution. You can review course details, schedules and register for the course of your choice. The courses currently being offered are:

    You get access to EPMU’s virtual classroom environment that includes a professional instructor and hosted computer environment to run your labs on.

    Check out the schedule and  be sure to register soon to get a spot in the class! The very last class begins in June 2009!

  • Project Programmability and Business Intelligence

    Updating Project Server 2007 custom applications for Project Server 2010

    • 0 Comments

    The Project 2010 SDK includes a general discussion about updating applications developed for Project Server 2007 to run with Project Server 2010. Because the PSI in Project Server 2010 is a superset of the previous PSI, many ASMX-based applications can run unchanged on a Project Server that uses only Windows authentication -- but all require testing before deployment on Project Server 2010!

    The Project Server Programmability page includes the Porting Applications Built for Project Server 2007 section, which links to the Migration and Compatibility of Custom Solutions section in the Overview of WCF and the PSI. In addition to the information on those pages, applications for multi-authentication installations of Project Server 2010 must be updated to handle forms-based and Windows-based authentication in the Claims environment of SharePoint Server.

    The ASMXLogon_MultiAuth sample in the recent Code samples from the Project 2010 SDK webcast blog post provides an example, using the information in the Using Claims Multi-Authentication discussion in the Prerequisites for ASMX-Based Code Samples article of the SDK.

    Even if your older application works on Project Server 2010, and you use only Windows authentication, it is a good idea to update the web service (ASMX) references and recompile, as described in Migration and Compatibility of Custom Solutions .

    --Jim

  • Project Programmability and Business Intelligence

    April update of the Project 2007 SDK is now available on MSDN

    • 0 Comments

    The April update of the SDK is now available on MSDN. It includes many final versions of articles that have been published as posts on this blog.  

    ·         SDK Download: http://www.microsoft.com/downloads/details.aspx?FamilyId=2672F6F9-7028-4B30-99A2-18CB1EED1ABE&displaylang=en .
    The pj12ProjectSDK.exe download includes (new and updated items in blue bold):

    o   pjSDK2007.chm (conceptual topics and managed code reference – the same topics as on the MSDN online library)

    o   pj12ReportingDB.chm (Reporting database schema reference and Visio diagrams)

      • OLAPCubeSchemas.xls (dimensions, measures, and properties of the Project Server OLAP cubes)
      • XML data interchange schema for Project 2007 (mspdi_pj12.xsd plus supplemental schemas for enterprise custom fields)
      • Statusing schemas (ChangeList.xsd and SetAssignmentWorkData.xsd)
      • Project Portfolio Server 2007 Database Reference (AccountData and AccountIndex)
      • Redistribution license for the Microsoft.Office.Project.Server.Library.dll
      • SDK code samples:
        1. ChangeXML Utility: generate, validate, and test ChangeXML parameters for the UpdateStatus method
        2. Custom Web Parts: two samples; one uses the Microsoft.Office.Project.Server.PWA.dll assembly, and one does not
        3. Impersonation: two samples; a simple console application and the Impersonation Web Application
        4. Login Demo
        5. OLP Example
        6. Project Guide: default Project Guide files, and the sample Critical Path custom Project Guide updated for Project 2007
        7. Project Workspace
        8. ProjTool: a sample application to help generate data and test many of the PSI methods
        9. PSI Extensions: develop and test a custom PSI Web service
        10. Report Pack: seven sample reports using SQL Server Reporting Services 2005 (SP1)
        11. Test Event Handler
    • SDK Online: Project 2007 SDK in MSDN online library: http://msdn2.microsoft.com/en-us/library/ms512767.aspx
      • Object Model Maps: The Project 2007 VBA Reference was also recently posted on MSDN, along with four pages of the new Project object model maps. For example, click any object in Application and Projects Object Map to go to the topic for that object. You can also see the object model maps in VBA Help when you use Project Standard or Project Professional. In the Project Help window, click the Connection Status menu at the lower right, and then select Show content from Office Online.
    • Portal:  Project Developer Portal in the Office Developer Center on MSDN includes links to the Project 2007 SDK,  Project 2007 blogs, as well as the Project 2003 SDK.

     

    What’s new in pjSDK2007.chm and the online SDK:

     

    In addition to new code samples and schemas in the download, the April update of the SDK includes 97 conceptual topics (28 new since the RTM release) and many updates in the managed code reference topics. Major new and updated conceptual topics include the following:

    ·         XML Schema References for Project (15 topics; includes the ChangeList Schema Reference)

    ·         Changes for Custom Project Guides 

    ·         Custom Fields in OLAP Cubes (in the Local and Enterprise Custom Fields topic)

    ·         How to: Generate ChangeXML for Statusing Updates

    ·         Project Server Report Pack (9 topics)

    ·         Walkthrough: Creating a PSI Extension 

    ·         Walkthrough: Develop an Impersonation Web Application

                                                                                                                                                       

    Other updates include enumeration descriptions, PSI method permissions, TimesheetDataSet properties, and a VBA sample for Project Deliverables.

     

    For related content, see the Office Developer Centers,  SharePoint Developer Center, and the SharePoint Server 2007 Developer Portal.

  • Project Programmability and Business Intelligence

    Microsoft Office System Developer Conference 2008

    • 3 Comments

    Hi,

    We are pleased to announce the dates and location for the 2008 Office Developer Conference!

    When: February 10-13, 2008

    Where: San Jose Convention Center, San Jose, CA

    Who: 2000 developers and architects who build solutions on the Office platform (Office clients, servers, and services)

    ODC 2008 will bring together architects, developers, industry technical experts, Microsoft insiders and key partners in a public forum for the first time! Together, we will redefine what it means to be focused on Microsoft Office development, exchange ideas on how to continue innovating in this ever-changing space, and share best practices on how to craft the next generation of Office Business Applications. Microsoft Chairman Bill Gates will deliver a special keynote that is not to be missed.

    We are giving you advance notice that our public site http://www.odc2008.com is going live on Monday morning, Sept. 17th. We will keep you updated when registration opens and as we have more information to share about the event. In the meantime, please help to spread the word about the conference and visit the site on Monday so you can subscribe to updates as we post them.

    See you there,

    - The 2008 ODC Team

    Answers to some Frequently Asked Questions about the conference:

    Who is the Microsoft Office System Developer Conference for?

    Those involved or interested in using the Microsoft Office system (clients, servers, and services) as an application development platform. For example, people in technical roles e.g. architects, developers, designers, and technical managers.

    Who can attend?

    The conference is open to the public.

    Is this the first time for this conference?

    No, Microsoft has held this conference three times in the past (2004, 2005, 2006). However, those conferences were only open to a select group by nomination/invitation. This is the first conference that is open to the public.

    Will it cost to attend the conference?

    Yes, there will be a reasonable registration fee for the conference. For those that register early, we will have a special early bird rate as well.

    How many people are you expecting?

    We’re expecting between 1800-2000 attendees

    Which products/technologies will this conference cover?

    Obviously, the conference will cover everything in Microsoft Office system, including clients, servers and services, but business productivity applications don’t exist in isolation. More and more, we’re finding that people are using others parts of the technology stack and bringing together various technologies to make applications more compelling. So a great number of sessions will have topics involving Office application development in the context of leading-edge technologies such as VOIP, Silverlight, integration with third-party line of business applications, etc.

    What tracks will you offer?

    We are still finalizing the organization of the more than 60 sessions planned. Track information will be available as registration opens in October.

    I’ve heard there’s also a SharePoint Conference. What’s the difference?

    The SharePoint conference will take place in March 2008 in Redmond, WA. Unlike the Microsoft Office System Developer Conference, the SharePoint conference is primarily intended for those in IT who use, deploy, and configure SharePoint. If you are focused on SharePoint deployment you should attend the SharePoint Conference. If you are a SharePoint developer you should attend Office System Developer Conference. Here you will find the most information about how to develop solutions that not only build on the SharePoint platform, but also take advantage of the other technologies in the Office system.

    Why didn’t you just have the conference at the same time/location with SharePoint Conference so people could attend both?

    We did look into this but couldn’t make this happen due to lack of suitable space.

    Who is delivering the keynote?

    Microsoft Chairman Bill Gates will be delivering a special keynote presentation. Visit our site www.odc2008.com in October to find out more about the other keynote speakers!

    Why did you choose San Jose instead of having the conference in the Seattle area?

    We looked at several options. Lack of suitable space was a key factor. Also, average temps in San Jose in Feb are Low: 45°F (7°C) High: 63°F (17°C) with 2.84 in (7.21 cm) of precipitation, whereas in Seattle the averages are Low: 37°F (3°C) High: 51°F (10°C) and 4.09 in (10.39 cm). It wasn’t a difficult decision to make.

    Who will present sessions?

    Sessions will be presented by Microsoft experts and MVPs, as well as other industry/technical experts.

    Will you have non-Microsoft staff presenting sessions?

    Yes. If you or someone you know would like to present on a relevant technical topic, we’ d be happy to consider them, though slots are very limited. To submit a session idea, please send all relevant information to odcspkr@microsoft.com

    Where can I find more information?

    Our web site www.odc2008.com will have more information about the conference as it becomes available. Check back often or sign up to get notified!

  • Project Programmability and Business Intelligence

    Microsoft Office Project Server 2007 and AJAX.NET

    • 1 Comments

    Even though Boris has moved on to another team in Microsoft, he still wanted me to share the following with you:

    Microsoft Office Project Server 2007 is built on top of Windows SharePoint Services, so you might think you can develop AJAX Web Parts as you do in Windows SharePoint Services, right?

    Unfortunately it’s not that easy. Actually the Web Part development process is the same, but you need to configure Project Server 2007 for AJAX support.

    Here’s what you need to do:

    You must configure the Project Web application and the Shared Services Provider Web Application to support calling Web services from script. In the Web.config file for the application, you must register the ScriptHandlerFactory HTTP handler, which processes calls made from script to .asmx Web services. For Web service calls that are not issued from ASP.NET AJAX script, the handler delegates the call to the default handler.

    You need to add the following lines to the web.config located in:

    [C:\Program Files]\Microsoft Office Servers\12.0\WebServices\root

    <httpHandlers>

      <remove verb="*" path="*.asmx" />

      <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory,    System.Web.Extensions, Version=3.5.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35"/>

    </httpHandlers>

    You also need to add the following line to the web.config of your project server installation which can be found here:

    C:\Inetpub\wwwroot\wss\VirtualDirectories\[PSweb app directory]

    <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>

    After making those changes to the config files the client runtime is now enabled for AJAX and you can start building AJAX Web Parts.

    Have fun

  • Project Programmability and Business Intelligence

    SharePoint 2010 Developer Conference Presentations

    • 0 Comments

    The SharePoint 2010 developer conference presentation files are available in PowerPoint and XPS format. They include developer presentations for integrating with Office 2010 clients. See SharePoint 2010 Presentations: Developer Conference Session Files.

  • Project Programmability and Business Intelligence

    Checked Out Resources

    • 0 Comments

    Phil Smail has this great code snippet for providing better error handling with regards to checked out resources:

    While working with the PSI I wanted to check out a number of resources. Obviously the situation can arise where some of those resources are already checked out and I wanted to report that information to the client.

    Unfortunately the PSClientError object only gives you information that there were resources already checked out but not which ones were checked out. The data is contained with the XML for the Exception so I wrote a helper function to extract this information out

    The output from the code looks like the following:

    The code is as follows:

    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Net;
    using System.Web.Services.Protocols;
    using System.Xml;
    
    namespace GetError
    {
        class Program
        {
            private const string RESOURCESWEBSERVICE = "/_vti_bin/PSI/Resource.asmx";
            static GetError.ResourceWsc.Resource Resource = new GetError.ResourceWsc.Resource();
    
    
            static void Main(string[] args)
            {
                String PWAURL = args[0];
                Resource.Url = PWAURL + RESOURCESWEBSERVICE;
                Resource.Credentials = CredentialCache.DefaultCredentials;
                Guid[] restypeGuids = new Guid[2];
                //Change these GUIDS to res Guids in your system
                restypeGuids[0] = new Guid("{f461c3f7-e0c9-414f-ae1a-41abe862f709}");
                restypeGuids[1] = new Guid("{4e5d7702-7748-4a18-bc5d-7beef7004188}");
    
                Console.WriteLine("Trying to check out resources");
    
                try
                {
                    Resource.CheckOutResources(restypeGuids);
                }
                catch (SoapException ex)
                {
                    String tempxml = ex.Detail.InnerXml;
                    ExtractError(tempxml);
                }
                Console.ReadLine();
            }
    
            static void ExtractError(String xmlstr)
            {
                XmlDocument doc = new XmlDocument();
                doc.LoadXml(xmlstr);
                foreach (XmlNode node in doc.DocumentElement.FirstChild.ChildNodes)
                {
                    String ErrString = "";
                    if(node.Name.Equals("item"))
                    {
                        //We know its one error
                        XmlNode n = node.Attributes.GetNamedItem("value");
                        ErrString = "Error: Resource - " + n.Value;
                        XmlNode childn = node.FirstChild;
                        if (childn.Name.Equals("error"))
                        {
                            XmlNode no = childn.Attributes.GetNamedItem("name");
    
                            switch (no.Value)
                            {
                            case "CICOAlreadyCheckedOutToYou":
                                ErrString += " Resource already checked out to you";
                                break;
                            case "CICOCheckedOutInOtherSession":
                                ErrString += " Resource checked out in another session";
                                break;
                            case "CICOCheckedOutToOtherUser":
                                ErrString += " Resource already checked out to another user";
                                break;
                            }      
                        }
                    }
                    Console.WriteLine(ErrString);
                }
            }
        }
    }
    
    
  • Project Programmability and Business Intelligence

    OLP Sample Code for Project Server 2010

    • 0 Comments

    The Object Link Provider (OLP) in Project Server 2010 enables the management of the Project-specific lists in a project site (issues, risks, deliverables, documents, and custom lists) and integration of the SharePoint lists with Project Server. The OLP  has the same functionality as in Project Server 2007; however, you can use Windows Communication Foundation (WCF) to develop OLP solutions for Project Server 2010.

    The attached code (OLP_Sample.zip) is a preview of an example that uses the CreateWebObjectLinks method, to be published in the next update of the Project 2010 SDK. Before you run the sample application, perform the following steps:

    1. Use Project Professional 2010 to create and publish a project with at least one task.

    2. Use Project Web App to open the project site.

    3. Create at least one issue or risk in the Issues or Risks SharePoint list of the project site.

    4. Change the OLP constructor values according to your example.

    5. Add a web service reference to http://localhost/pwa/_vti_bin/Lists.asmx, and name the reference WebSvcLists.

    This example performs the following tasks:

    • Verifies that the project, task, and project site exist and gets their corresponding GUIDs.

    • Links a task and a SharePoint list item (in this case, an Issue).

    • Links a task and a generic object.

    • Gets the list of SharePoint items that are linked to a task and writes the contents of the ObjectLinkProvider dataSet dsLinkedObjects to an XML file.

    • Gets a list of generic items that are linked to a task.

    • Deletes the links to web objects.

    For more information about how the sample code works, see Procedures 1-6 in How to: Use the OLP to Link an Object to a Task.

  • Project Programmability and Business Intelligence

    UPDATED: Webcast: Communication between Project Professional and Project Server - Active Cache processes and Architecture drill down (Level 300)

    • 1 Comments

    Great attendance – thank you!

    WebCast Overview
    This webcast will uncover processes and key messaging between Microsoft Office Project Professional 2007 and Microsoft Office Project Server 2007. From first logon, through operations like project open, save and publish, we will describe in detail the ‘cache’ folder structure and registry settings. Network traffic between client and server will also be explained. Finally, we will discuss enhancements made to increase client/server communication scalability and reliability.

    Jan

  • Project Programmability and Business Intelligence

    Where is the XML file for modifying the PWA ribbon?

    • 0 Comments

    Some folks have asked about the pwaribbon.xml file and modifying the ribbon in PWA for Project Server 2010. The SDK article Walkthrough: Customizing the PWA Ribbon and Accessing the JS Grid includes that information, although the article can be overlooked if you are not concerned with the JS Grid control. Here is the introductory information in the article about the pwaribbon.xml file:

    Modifying the Project Web App Ribbon with an Elements.xml File

    The Server ribbon for Project Web App is defined in the pwaribbon.xml file in [Program Files]\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\PWARibbon\listtemplates. To modify the Project Web App ribbon, you can use a custom Elements.xml file to add, change, or remove tabs, groups, and controls in the ribbon. For general information about modifying the Server ribbon in SharePoint applications, see Server Ribbon XML.

    Caution

    You should not modify the pwaribbon.xml file itself. Updates and service packs can replace the pwaribbon.xml file and overwrite your changes. Changes that you make in the pwaribbon.xml file are not supported.

    You can also search MSDN for PWA ribbon. The article is at the top of the list.

  • Project Programmability and Business Intelligence

    Sweeten your Project 2010 environment with Custom Fields

    • 1 Comments

    The Project 2010 SDK nicely documents Custom Field functionality – very important functionality for customizing Project 2010 - Custom Fields enable you to capture and calculate additional metadata for Projects, Resources, Tasks and Assignments. Project 2010 SDK: “You can filter, group, sort, and create OLAP cubes and reports based on custom field values. Project 2010 extends the functionality and ease of use of custom fields compared to previous versions of Project.” – lot of power and relatively easy to do! However – proper planning is strongly advised :)

    Project 2010 SDK: Custom Fields in Project 2010 (http://msdn.microsoft.com/en-us/library/ee767683(office.14).aspx)

    Many executives like graphical indicators – that simple graphically show the values in your Custom Fields (Visual Studio not required, all could be configured via PWA or Project Desktop User Interface, even when an advanced calculation formula is required) -

    Using Formulas and Graphical Indicators with Custom Fields (http://msdn.microsoft.com/en-us/library/ee767700(office.14).aspx)

    Using graphical indicators in Project

  • Project Programmability and Business Intelligence

    TechED Europe - Microsoft Project 2010 Overview PowerPoint Deck

    • 1 Comments

    We did two Project 2010 sessions at TechEd Europe – Christophe (thanks!) posted the decks on SkyDrive here as he mentioned here http://blogs.msdn.com/chrisfie/archive/2009/12/22/microsoft-project-2010-overview-powerpoint-deck.aspx

    We have also shot two short videos on the 2010 news for Developers and  IT Professionals as mentioned here.

    Happy holidays!

  • Project Programmability and Business Intelligence

    Upcoming WebCast: Project Server Development for SharePoint Developers (Level 300)

    • 0 Comments

     

    Let me highlight the following webcast that we conduct Thursday, May 05, 2011 8:00 AM (GMT-08:00) Pacific Time. Make sure to register now to get automatic reminder!

    MSDN Webcast: Project Server Development for SharePoint Developers (Level 300)

    Language(s): English.

    Product(s): Microsoft Project 2010

    Audience(s): Pro Dev/Programmer

    This webcast covers the Microsoft Project Server development features from a Microsoft SharePoint developer's perspective. We explain the logical architecture of Project Server in a SharePoint farm and compare the development features. We also give real world examples such as the ribbon UI, Windows Communication Foundation (WCF) server programming, web part with JS Grid, Workflow for Demand Management, and cmdlets for Windows PowerShell. The key takeaway is for SharePoint developers to understand the similarities in development to be able to join the Project Server developer community.


    Presenters: Steven Haden, Senior Consultant, Microsoft Corporation and Olivier Laymand, Senior Consultant, Microsoft Corporation


    Steven Haden is a senior consultant working for Microsoft Services in France. He is involved in large Microsoft Project Server and Microsoft SharePoint deployment. Steven is interested in both the architecture and the development of solutions and is the author of the white paper "Hitchhiker's Guide to Demand Management" (http://go.microsoft.com/fwlink/?LinkId=200608).


    Olivier Laymand is a senior consultant from Microsoft Services working on large Microsoft SharePoint and Microsoft Project Server deployments. He's involved in solution architecture definitions, development of best practices, and governance.

  • Project Programmability and Business Intelligence

    Using the updated ChangeXML utility for Statusing

    • 0 Comments

    The Statusing methods in the Project Server Interface (PSI) in Microsoft Project Server 2010 enable one user to read, submit, and update assignment and task status for another user, without resorting to impersonation. In the Project Server 2007 SDK, the How to: Generate ChangeXML for Statusing Updates article shows how to generate the changeXml parameter for the UpdateStatus method, validate the XML, and use the ReadStatus and SubmitStatus methods. The Project 2007 SDK download includes the complete Visual Studio 2005 solution for the ChangeXML utility. However, the ChangeXML utility could only update status for the current user.

    The ChangeXML utility  is now updated for Project Server 2010, in the attached ChangeXMLUtility.zip file. With it, you can generate the changeXml parameter and update status for the current user or for another user. To update status for another user, the utility uses the ReadStatusForResource and UpdateStatusForResource methods. In addition, the utility checks whether the current user has the global StatusBrokerPermission security permission, adds the ResID attribute to the changeXml parameter, and validates the XML against the updated ChangeList.xsd schema in Project Server 2010. For more information about the ChangeList.xsd schema, see Introduction to the ChangeList Schema and Statusing ChangeXML.

    Note: The ChangeXML utility is designed for use only on a test installation of Project Server 2010, as an example of a programming utility for statusing. It should not be used on a production installation.

    The updated ChangeXML utility also has several other changes. The previous version uses the ASMX interface, which was the only choice available for Project Server 2007. In the updated version, you can choose to programmatically initialize the WCF interface of the PSI by entering the Project Web App URL, or by using the WCF endpoint values in the app.config file. In the following screenshot, the login is automatic if you use the app.config value.

            ChangeXML_LogOn_AppConfig

    Note: To use the app.config file, change the URL to the value for your PWA instance, for each PSI service endpoint.

    In the main window, after you log on Project Server, choose Build Change XML.

            ChangeXML_Main_Empty

    You can choose to update the status of available assignments for the current user, or – if you have the StatusBrokerPermission – you can choose another user and update assignments for that user. In the following screenshot, the update is for another user. The Items available for update list shows the Project name : Task name : User name values for each item. You can choose to update assignment values or task values for that assignment. The Generate a Change dialog box shows different controls in the Update section, depending on what kind of update you choose. For example, if you choose to update an assignment custom field, you can choose the custom field and the lookup table value, if the custom field uses a lookup table.

            ChangeXML_Generate_4User_Assign_HealthCF

    When you choose Update XML, the tool generates the changeXml parameter value, as follows:

            ChangeXML_Main_4User_Assign_HealthCF

    Following is the changeXml parameter value in the case shown, for updating the Health assignment custom field. Note that the XML value includes the ResID attribute for the Assn element.

    <Changes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <Proj ID="a3e78597-2302-45fc-bb15-7f23d74efdf8">
        <Assn ID="b001d2d9-69eb-49a0-aa9f-6bbe53f9484c"
    ResID="aa3a6f6f-bb70-4d2e-92da-b06580ae6376"> <LookupTableCustomFieldChange IsMultiValued="false"
    CustomFieldType="Text"
    CustomFieldGuid="00004f6d-90a2-439a-8cc2-1c1ef6d2da4f"
    CustomFieldName="Health"> <LookupTableValue
    Guid="0000c45d-8a43-4eb0-9b74-e535b391988a">Late</LookupTableValue> </LookupTableCustomFieldChange> </Assn> </Proj> </Changes>

    You can clear the Run Update check box to just validate the changeXml parameter. For example, manually change one of the elements, attributes, or values in the XML, and see if it still validates. Or, you can check Run Update to validate and run the change.

    When the change is completed, try opening the project in Project Professional. If you are the project manager, you are prompted to review the status change in PWA. If you accept the change in PWA, to see the change, open the project in Project Professional. For example, if you changed the Health assignment custom field, go the the Task Usage view, and then add the Health field to the view.

            WinProj_OpenProject_AssnHealthCF_Changed

    After you save and publish the project, you can also see the change in the Reporting database. For example, run the following query in SQL Server Management Studio for the RDB:

    SELECT TOP 1000 [AssignmentUID]
          , [ResourceUID]
          , [Health_T]
        FROM [ProjectServer_Reporting].[dbo].[MSP_EpmAssignment_UserView]

    Find the correct assignment and resource GUIDs in the Results pane:

    SQLSrv_ReportingDB_EpmAssignment

    The ChangeXML utility is useful for creating and testing values of the changeXml parameter for the UpdateStatus method,
    where
    you can create and test changes for the current user and for other Project Server 2010 users. It also contains code examples
    that show how to check for a security permission of a resource and use statusing methods.

    Updating the ChangeXML utility

    Here are the main steps that were used to update the application from Project Server 2007 to 2010. The user interface had only
    minor tweaks, because that was not an issue for a test tool.

    1. Open in Visual Studio 2010 to update the solution; change the target to .NET Framework 3.5.
    2. Add a reference to the updated ProjectServerServices.dll, which contains a proxy WCF interface of the PSI services.
    3. Remove ASMX initialization; initialize PSI services for WCF (programmatic and/or with app.config). This step is not
      essential, but the WCF interface is recommended for moving forward.
    4. Modify the login dialog box; use the WCFHelpers.dll assembly from ProjTool for login routines. The ProjTool code for
      Project Server 2010 is in the SDK download.
      Note: The logon routines for Forms authentication are not updated in this sample.
    5. Get and display the StatusBrokerPermission value for the current user. Enable the Update for user option if the current
      user has the correct permission.
    6. Get the list of active resources, by using ReadUserList; add the ResourceItem class for combobox display and values.
    7. Refresh the list of items to update, by using ReadStatusForResource.
    8. Add ResID to classes for generating and displaying the changeXml parameter (ChangesProj, ChangesProjAssn,
      ChangesProjTask, and Items).
    9. Remove the empty ResID attribute in the changeXml value for the current user.
    10. Run statusing updates for a selected user, by using SubmitStatusForResource.
    11. Test

    In actuality, testing occurs after each step is completed.

    —Jim Corbin

  • Project Programmability and Business Intelligence

    Converting COM add-ins to VSTO for 64-bit Office apps

    • 0 Comments

    64-bit Office apps--including Project 2010--do not support COM add-ins, which are 32-bit. To use the 64-bit environment, COM add-ins must be ported to a 64-bit add-in by using the Office Development Tools in Visual Studio 2010 (often referred to as Visual Studio Tools for Office, or VSTO).

    There is no direct conversion tool for porting 32-bit COM add-ins to VSTO for 64-bit Office apps. The amount of time to port a COM add-in can vary greatly, depending on the functionality and Project version for which it was designed. A simple add-in designed for 32-bit Project 2010 might take a few hours; something like Solution Starter: Scrum for Project 2003 (although I haven’t done a port) might take several weeks and require a complete redesign, because it uses features that are no longer available in Project and Excel 2003 – and it was written in VB6.

    Issues:

    ·         VSTO in VS 2010 supports only Office 2007 and 2010.

    ·         Carefully check the types when you convert the code (int, long, etc.).

    ·         When doing the port, you can use compiler constants to make the code usable in both 32-bit and 64-bit Office apps. See Tables of VBA Object Model Changes for a VBA example, and for a comparison of types in VB and C#.

     

    See also (VBA-related, not specifically for add-ins) Working with VBA in Office 2010 (32-bit) and Office 2010 (64-bit).

     

    You might also want to check out Add-In Express 2010; see, for example, Converting existing Office COM add-in projects to Add-in Express.

     

  • Project Programmability and Business Intelligence

    MSDN Webcast: Project Server Events and Workflows, Demos & Q&A

    • 2 Comments

    Hi All,

    Thank you for attending my MSDN webcast Project Server Events and Workflows.  Don’t forget about next weeks webcast on Project Client programmability.   Below is some of the Q&A I got during the webcast.  Attached is the demos from the webcast.

    Question Answer

    Will you chat at all about Project Server 2010? Are there any plans for changes in the new version?

    Still too early to talk about Project Server 2010 other than to to say I’m looking forward to it.  We’re a few months away from announcing the features. 

    What should you be thinking about as a developer?  Project is committed to the PSI and designed it to be extensible.  The new functionality will be extensions to existing functionality.  This means your work today should be backward compatible.  I did say should so please don’t shoot me if there are a couple “gotchas.”

    Is the command (i.e save project) already queued, when an event is raised?

    The event will be raised when the call executes from the queue.

    Based on your description of pre and post, the "project published" event is raised after save to the db. Would you say its best to eval business rules afterward, log violations, notify user and delete from db? is there an ability to only delete from PDB and leave in DDB so user can correct and attempt re-publish?

    I hate to waffle in my answers, but in this case it depends on the context.  I put together a little matrix below to help with this question.

    Is it microsoft.office.project.schema.dll or microsoft.office.project.server.schema.dll?

    microsoft.office.project.schema.dll is the correct DLL.

    Is there anything to pay special attention for (i.e. concurrency, locking, etc.) with events on heavy loaded systems or is this solved by "serialized" execution through the project server queue?

    The queue helps to solve issues with heavily loaded systems.  Specifically with events you need to pay attention to the length of processing in pre-events.  In a pre-event you are disrupting the flow of Project Server, you should keep your processing to a minimum.

    Using events to enforce business rules

      Easy Rollback Difficult Rollback
    Short Business Rule Evaluation Evaluate in pre-event, rollback unnecessary. Evaluate in pre-event, rollback unnecessary.
    Long Business Rule Evaluation Consider using a post event. This is the hardest case.  You’ll really need to evaluate the complexity of the rollback.  Maybe you could break the business rule evaluation in phases?
  • Project Programmability and Business Intelligence

    EPM 2007 Test Data Population Tool

    • 2 Comments

    Christophe just passed along this information:

    The EPM 2007 Test Data Population Tool solution starter was published on CodePlex today: http://www.codeplex.com/EPMDatapop

    MWSnap048 2007-11-26, 19_26_50.jpg

    The EPM 2007 Test Data Population Tool enables you to load large amounts of EPM data: resources, projects, tasks, assignments into a Project Server 2007 database. You can then use this data to test loads and help your organization plan for your Project Server 2007 deployment. This tool is similar to the EPM 2003 Data Population utility but contains more features plus since the sources are provided you can customize it to fit your specific needs.  It was written by EPM World Wide Center of Excellence (WW COE) to generate data needed to perform performance and scalability labs for large and complex EPM deployments.

    The EPM 2007 Test Data Population Tool is a Win Form application that leverages the Project Server Interface (PSI) and/or WinProj (Project Professional).

    This solution starter includes a 15 pages document, a setup.exe to deploy it, as well as all source code.

    A special thank you to Mike Shughrue and Michael Jordan from the EPM WW COE for creating and testing the tool extensively during scalability labs, as well as Boris Scholl from the Product Marketing Group for reviewing the code and documentation. 


    About CodePlex

    CodePlex is Microsoft's open source project hosting web site. You can use CodePlex to create new projects to share with the world, join others who have already started their own projects, or use the applications on this site and provide feedback. A word about Microsoft’s role: Microsoft does not control, review, revise, endorse or distribute the third party projects on this site. Microsoft is hosting the CodePlex site solely as a web storage site as a service to the developer community.

    Q&A

    Q: Is the tool supported?

    A: There is no support in terms of CSS/PSS. We expect the support being a CodePlex community effort. Please note that the customization code uses standard supported web service calls available out of the box in EPM2007.

    Q: Is the tool free?

    A: Yes.

    Q: Can I distribute the tool and the source code to customers and partners?

    A: Customers and Partners can use both. Please point them to CodePlex as they have to agree on the license terms

    Q: Can a partner distribute the tool and code as is?

    A: No, but he can point his customer to the website to download it, so he makes sure that the customer agrees with the license terms.

    Q: Can a customer install the customization and use it?

    A: Yes the customer can, but he/she is responsible for testing it and running it.

    Q: Can I suggest changes to it?

    A: Yes, join the CodePlex community or send us an email: epmssdev@microsoft.com

    Q: Will this tool be distributed in other ways (i.e. DVDs)?

    A: No.

    Q: What skills do I need to modify or change the tool?

    A: C#, Project Server Interface, and a good understanding of the EPM 2007 data schema.

    Q: I’m trying to modify the code and do have questions. Who do I ask?

    A: Go to the EPMDatapop discussion forum on CodePlex.

    Regards,

    Christophe Fiessinger

Page 5 of 11 (255 items) «34567»