Can I set Read Only fields in My Tasks view RRS feed

  • Question

  • We are trying to customize the My Tasks view to include certain fields and hoping to make these fields Read Only.  Currently, content of these fields can be modified by the team resources on their screens. 

    We're using the Percent of Work Complete tracking method, and in order to provide some measure of context for a team resource as they update progress on their tasks, we added the following fields:

    • Baseline Work [Assignment]
    • Work [Assignment]
    • Start [Assignment]
    • Finish [Assignment]

    We have also retained the default fields:

    • Task Name
    • Actual Start
    • Progress
    • Actual Finish
    • Remaining Work
    • Resource Name

    The challenge is that the Work [Assignment], Start [Assignment], and Finish[Assignment] fields can be changed in this View by the team resource.  We think that that is an exceedingly bad idea since these values are calculated in the background by the Duration Equation (D*U=W), and messing with these could really mess up a project manager's day.  Can these fields be made to be Read Only so that their function is informational for the team resource??

    Any help would be greatly appreciated!



    Thursday, July 8, 2010 3:09 PM


All replies

  • Chris --
    Refer to the following blog post as your guide to locking down the fields you want for display purposes only:
    The blog post shows you how to lock the Start and Finish fields, which you should also consider locking, in my opinion.  Hope this helps.

    Dale A. Howard [MVP]
    VP of Educational Services
    "We write the books on Project Server"

    Thursday, July 8, 2010 3:19 PM
  • Dale

    MANY thanks!!  It seems to have done the trick!  The only change I made was to add a third column to be rendered as read-only - and once I figured out that in addition to the enumeration of the three columns at the beginning I also had to identify the third column in the body of the code, it worked perfectly!

    Can you see any problems with this code???

    <script type="text/javascript">


    var selectedcolumn1 = 4;


    var selectedcolumn2 = 7;


    var selectedcolumn3 = 10;


    var tbls = document.getElementsByTagName('table');


    for (var tblid=0; tblid<tbls.length; tblid++){


      if (tbls[tblid].className == 'XmlGridTable'){


        var rws = tbls[tblid].getElementsByTagName('tr');


        for (var rwid=0; rwid<rws.length; rwid++) {


          var tblcells = rws[rwid].getElementsByTagName('td');


          for (var tblcellid=0; tblcellid<tblcells.length; tblcellid++) {


            if ((tblcellid == selectedcolumn1) || (tblcellid == selectedcolumn2) || (tblcellid == selectedcolumn3)) {


              var anchs = tblcells[tblcellid].getElementsByTagName('a');


              if (anchs.length>0) {


                for (var anchid=0; anchid<anchs.length; anchid++) {


                  if (anchs[anchid].getAttribute("contenteditable") == "true") {


                    anchs[anchid].disabled = true;




















    Monday, July 12, 2010 6:56 PM
  • Chris --
    I was not the author of the blog post, as Tony Zink from our company gets the credit.  I'm not conversant with Javascript, so I cannot even begin to comment on your code.  But if the code works, who can argue with success!  Way to go, my friend.

    Dale A. Howard [MVP]
    VP of Educational Services
    "We write the books on Project Server"

    Monday, July 12, 2010 10:33 PM