ProjServer 2010: Timesheet, JSGrid, and getting a Resource Custom Field RRS feed

  • Question


    Hi all,

    I'm looking at building a solution that will perform custom validatation on timesheet entries in PWA 2010 Single Entry Mode. Depending on the value of a custom field for the current resource, I would like to change the validation. (I.e. If a user has an "Overtime" custom field set to "No" then the timesheet would not allow time over 40 hours.)

    The JSGrid presentation from about a year ago gives plenty of great, detailed information on how I can perform the validations and control the data entry:

    The challenge right now is what's the best way to find the Resource custom field value. To integrate with my validation, this will need to happen client-side, in Javascript. (Please correct me if I'm wrong.)

    I see three possible approaches:

    1) Add the resource custom field column to the My Timesheet view. Pro: I can get the value easily. Con: A fragile solution: if anyone removes that column, my validation would break.

    2) Create a custom web service (maybe a PSI extension?) which I can call from Javascript to get the required custom field value. Pro: doable, and reliable. Con: I'm weak in Javascript, so I'm not yet sure what the best options are for this => additional time in development.

    3) Access the existing web services (PSI) from Javascript. Pro: possibly easier than #2. Con: not sure how reasonable this method is.

    • Does anyone have any ideas, particularly on approach #3: How can I get at PSI data from within Javascript executing in one of the PWA pages?
    • Am I missing some simpler way to get at Resource Custom field values? Maybe I could embed this into the page somewhere, and just get the hidden element when needed?

    Thanks in advance for any feedback...

    Jamie Fraser

    Friday, May 6, 2011 6:48 PM