none
how to define a unique project level custom field in project server 2010?

    Question

  • Hi every one;

    is it possible to define a unique project level custom field?

    our client wants to have a unique custom field( project code) which doesn't allow users to save and publish projects with the same value.

    for example if user A define a project and set "project code = 1" if user B define another project and wants to save "project code =1" for it, the server doesn't allow him to save this value and he has to change value for example to 2

    thanks for any help

    Sunday, December 22, 2013 1:50 PM

All replies

  • Hi Sam,

    Yes it is possible to achieve from PSI coding.

    In project Publishing event you can write your logic which will validate if unique project code is available or not if it wont be available it will pop up one message to give the project code and if unique project code will be available then it will publish the project plan.

    Custom field will not work as if you will make it required also it wont check the uniqueness of the value.


    kirtesh


    • Edited by Kirteshtiw Sunday, December 22, 2013 2:20 PM
    Sunday, December 22, 2013 2:19 PM
  • Hi Sam,

    Another way (that I actually implemented few months ago) is to consider the native "project name" as your code name. Then it will be unique, since the project name field must be unique. Finaly create a "project name" custom field.

    Be careful that doing thing, the displayed project name is any view (timesheet, assignments...) will be the code that might not be relevant to users. Some views can be customized adding a "project name" custom fields, but some other cannot (assignments from resource center for example).

    Hope this helps.


    Guillaume Rouyre - MBA, MCP, MCTS

    Sunday, December 22, 2013 5:59 PM
  • Hi Sam,

    Yes it is possible to achieve from PSI coding.

    In project Publishing event you can write your logic which will validate if unique project code is available or not if it wont be available it will pop up one message to give the project code and if unique project code will be available then it will publish the project plan.

    Custom field will not work as if you will make it required also it wont check the uniqueness of the value.


    kirtesh


    thanks kirtesh

    could you guide me how to do with PSI coding? I don't have any knowledge of that.

    can I do that on my custom fields?

    Monday, January 13, 2014 7:58 AM
  • Hi Sam,

    Check this post, for generating Unique ID for projects.

    http://epmxperts.wordpress.com/2012/05/21/generate-unique-id-for-project-using-a-webpart/

    Thanks and let me know in case have any doubts.


    Sachin Vashishth MCTS

    Monday, January 13, 2014 8:44 AM
  • To start with PSI you need to have Development Environment of Project Server 2010.

    Then you need to download SDK so that you can take help from that.

    you can get the overview from http://msdn.microsoft.com/en-us/library/office/ms457477(v=office.14).asp

    You can get the information about SDK http://msdn.microsoft.com/en-us/library/office/ms512767(v=office.14).aspx

    You can get the solution for your requirement from http://epmxperts.wordpress.com/2012/05/21/generate-unique-id-for-project-using-a-webpart/

    Otherway way around if you dont want to do coding then you have to do it manually i mean to say you have to create in custom field in which project owner need to fill unique number let say SAP project number or Oracle project number manually and you can add that custom filed in PDP and Project center view but for that you have to teach users and create one process to reduce or minimize the manual error.


    kirtesh


    • Edited by Kirteshtiw Monday, January 13, 2014 11:29 AM
    Monday, January 13, 2014 11:25 AM
  • thanks kirtesh

    could you guide me how to do with PSI coding? I don't have any knowledge of that.

    can I do that on my custom fields?

    Easier way of using PSI with FluentPS:

    http://sharepoint1on1.blogspot.com/2013/01/how-to-use-project-server-psi-functions.html

    Wednesday, January 15, 2014 3:04 PM
  • Hi Mario

    To start with PSI customization, basic need would be to have an understanding of C#/VB along with .NET concepts, as long as you have that, best place to start with will be the project server SDK documentation available for download on technet, SDK has kind of step by step guide which will help you understand how PSI works, PSI are exposed API's or WCF / web services which can be consumed to update / read values from project server   

    But to your question of having a unique code value for any given project could be handled 2 ways, either its auto generated in this case users doesn't needs to do anything, no validation and other things would be required, since the custom code will make sure the uniqueness of the value, where as in other case if you want user to select the value then in this case you will need to put in a validation within server side event handlers(again explained in SDK, also available here ) on Save event where it will validate the value and would only allow save if its unique

    Let us know if this helps


    Thanks | Sunil Kr Singh | http://epmxperts.wordpress.com

    Wednesday, January 15, 2014 3:28 PM
    Moderator
  • First of all you need to have Project server development environment also for coding visual studio hands on is required.

    To start with PSI (Project Server interface)you need to have Development Environment of Project Server 2010.

    you can get the overview from http://msdn.microsoft.com/en-us/library/office/ms457477(v=office.14).asp

    You can get the information about SDK: Download SDK.

    http://msdn.microsoft.com/en-us/library/office/ms512767(v=office.14).aspx

    Below mentioned link is having code and reuqired information about :

    Generate Unique ID for Project using a webpart

     http://epmxperts.wordpress.com/2012/05/21/generate-unique-id-for-project-using-a-webpart/



    • Edited by Kirteshtiw Wednesday, January 15, 2014 3:31 PM
    Wednesday, January 15, 2014 3:30 PM