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.
 
 

April, 2009

  • Project Programmability and Business Intelligence

    MSDN Webcast: PSI Review, Demos and Q&A

    • 2 Comments

    Hi All,

    Thank you for attending my PSI review MSDN webcasts, I really enjoyed delivering them.  I think if I deliver again it’ll need to be three webcasts, I barely finished part A, and left out three web services in part B.  Below is some of the Q&A I’ve gotten.

    Question Answer

    Create a custom timesheet import UI. So create timesheet from data in Excel for example (each row as a new timesheet maybe?)

    This is totally possible through the timesheet and statusing web services. The biggest challenge will be keeping your external line items names in sync with internal ones you define in Project Server.
    Right now the rates table, you can only put 5 rates in there. Explore ways to put more than 5 rates per resource. Your right that there are only 5 rate available. There are a couple possibilities, all involving custom fields. You would save your extra rate information in a custom field. Then by some event triggering (either client or server side) you could move the appropriate cost information into the table. It’s not the best solution, but could be the start of a workaround for you.

    I want to work on top of various projects that have a certain CustomField value. Going into every project's dataset takes waaaay too long. Is there a better way to do this with PSI?

    There really is no shortcut.  My best advice is to write some helper methods that get you to the values you want.

    Is it ok to use VB for all this stuff or is it much better to use C#?

    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#.

    I am trying to sync the values in a Look up table with an external SQL table so the two stay in sync. What is the best way to do this? the table is a customer table from the accounting system

    Going from the accounting system to Project Server should be easy with all the PSI calls available to update the business entities (Project, Resource, etc.).  Going from Project Server to the accounting system is more challenging.  The event system in Project Server will only tell you an entity changed, not the specifics of what changed.  So you’ll need to detect the change and then go into the entity to check for changes.

    What types of programming tasks are going to take existing GUIDs, and what tasks will require us to generate our own GUID? Queueing? Object Creation? It would seem like Project Server would want to own the GUID, for sync'ing and stuff, right?

    Calls that create new entities will have you create a new Guid, for instance QueueCreateProject.  The most common thing you’ll create a new Guid for is the JobUid that’ll you’ll pass to queue enabled calls.

    I don't mean to oversimplify, but if we have an admin backup scheduled daily, isn't that what you are referring to as the 'archive' (although with code you can have more control rather than an all or nothing).

    Archiving is moving entities to the archive database so they are no longer taken into account in the operational system.  BUT… they are available to restore when you need.  It’s way more complicate than that, you should look at the books online to get a good handle on the archive process.

    Do you have any customers that are automatically tweaking the queue configuration settings in a production environment?

    None that I know of.

    For AD Credentials, I use the NetworkCredentials class, which class do I use for the Forms logins? I don’t use it, just curious.... It blocks my outbound webservices connection, I can't seem to authenticate properly, any tips?

    Use the LoginForms web service and pass the username and password via that.
  • 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

    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

    Project Developer Center has a new design!

    • 1 Comments

    Our “very” own Project Developer Center got a new design by the MSDN writers – it means richer and more discoverable content for you! Check it out, it’s really stunning!

    Thanks for the hard work to Jim and Verna! As always any feedback, comments, ideas could be directed to EPMDev@microsoft.com.

    Jan

  • Project Programmability and Business Intelligence

    Project SP2!

    • 1 Comments

    We have released SP2. For more details, check out Christophe's blog: 

    http://blogs.msdn.com/chrisfie/archive/2009/04/28/announcing-service-pack-2-sp2-for-microsoft-project-2007-and-microsoft-project-server-2007.aspx

    Chris

  • Project Programmability and Business Intelligence

    Two More MSDN Webcasts Coming

    • 1 Comments

    It seems like I’ve been doing Project Programmability webcasts for months… oh yeah I have :).  There are still two more left, check them out:

    Date

    Session Title

    April 23, 2009 Office Project Client Programmability
    May 14, 2009

    EPMAuditing Solution Starter Drilldown

    Both start at 8:00 AM PDT.

  • Project Programmability and Business Intelligence

    Migrating from Project Server 2003 to 2007 – best practices white paper

    • 0 Comments

    As Christophe pointed out in this blog post, we have now a very comprehensive white paper “Best Practices for Migrating to Project Server 2007” that provides guidance, references, and best practices to observe when migrating to Microsoft Office Project Server 2007 from Project Server 2003.

    But how does it apply to you as a developer? 

    Project Server 2007 has a new API - Project Server Interface (PSI) that is a managed code interface opposed to the older Project Data Service (PDS) XML message interface found in previous versions of Project Server. And yes this means a lot :)

    I’m pretty sure you have already investigated the content in the Project Server 2007 SDK (http://msdn.microsoft.com/en-us/library/ms512767.aspx), so let me point you to this chapter in the 2007 SDK “PDS Parity in PSI Web Services” - http://msdn.microsoft.com/en-us/library/ms197081.aspx. It has 3 articles inside, including equivalence table and code examples.

    We would love to hear your feedback on the “PDS Parity in PSI Web Services” or any other feedback on the developer documentation and resources could be shared via EPMDev@microsoft.com. Thanks!

Page 1 of 1 (7 items)
Recent Posts