Skip to main content

Project Server - Change field name on PDP for standard fields (like the Owner field)

Project Server - Change owner field name on PDP

The field names on the PDPs (Project Detail Pages) has been preselected on the standard fields for a project. If you want to change the Owner to something else it is quite difficult. In the following i will explain how we can change this field through the Content Editor webpart.
To change the owner field add a Content Editor webpart to the PDP page where the field is inserted.

Select the webpart and from the ribbon select HTML->Edit HTML Source.
Copy/Paste the following code into the Content Editor webpart.

<script type="text/javascript">
    var old_name = "Owner";
    var new_name = "Ansvarlig";
    var ttnA = document.getElementsByTagName("div");
    for (var j = 0; j < ttnA.length; j++) {
        var orig = ttnA[j].innerHTML;
        var stripped = orig.replace(/^\s*/, "").replace(/\s*$/, "");
        if (stripped == old_name) {
            ttnA[j].innerHTML = new_name;
        }
    }
</script>

Replace “Owner” with the field you want to change the name for and replace “Ansvarlig” with the value you want to display the field as.

Click OK and Stop Editing and the field name should be updated.


Comments

  1. Hi Christian!
    Have you tried it for Project Server 2013? I can't make it work in a 2013 PDP and wondering if the code could be used as is or need some tweeking?
    Thanks in advance.

    ReplyDelete
  2. To get the script to work in Project Server 2013 change the following line
    var ttnA = document.getElementsByTagName("div");
    to
    var ttnA = document.getElementsByTagName("h3");

    Place the content editor wep part in the Footer panel

    ReplyDelete
  3. what if i want to change name of three custom fields,would it be works?
    I am able to change lable of owner field to my desired label when i place content webpart under owner field,it works fine for me.

    What if any field placed at top of page,can this query works?

    SUmit Arora

    ReplyDelete

Post a Comment

Popular posts from this blog

Sharepoint 2013 - Fullscreen mode/hide quick launch

If you want to hide the quick launch on a SharePoint page or web part page in 2013 you could of cause use CSS scripts as in 2010.
But as a new thing in 2013 the user have the possibility to click on full screen mode. so why not load your page in this mode and then the user can choose to exit the mode if he prefers.

Add a content editor webpart to your page and click on Edit HTML from the ribbon.
Add the following code:

<script type="text/javascript">
window.onload = function()
{
  SetFullScreenMode(true);
}
</script>

Install DLL in GAC - Windows 2008/2012 (Using Powershell, No GacUtil.exe)

If you want to install a DLL in the GAC and do not have the GACUtil.exe available. Powershell is properly the easiest way to procede.

Before Powershell you would properly just drag the DLL file into the C:\Windows\Assembly but this option is usually not available anymore.

Powershell - Add DLL to GAC So to install a DLL file in the GAC simply execute the below Powershell script. Remember you migth want to run the Powershell prompt as an administrator.
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")$publish=New-ObjectSystem.EnterpriseServices.Internal.Publish$publish.GacInstall("c:\temp\MyDllFile.dll")iisreset
The first line adds a reference to the assembly we need to be able to mange the GAC.
The second and third lines retrives the GAC object and publish a new DLL file to it.
The last line resets the Internet Information Services. This is only needed if your DLL file is used in a websi…

SharePoint/Project Server - Firewall port open list

Firewall port open list Every time I have to install a new instance of Project Server I forget which ports have to be open.
The ports are divided into 3 lists, one list for the web front end servers, one list for the application server and one list for the SQL server.
These ports are based on a 2013 installation of SharePoint/Project Server. the 2010 installation defer a little bit.


Web Frontend ServerWhen a range is specified all ports between the range must be opened.
     Port(s)ProtocolBoundDescription
-80 TCPInhttp
-443 TCPInhttps/ssl
-25 TCPInSMTP for e-mail integration
-16500-16519TCPInPorts used by the search index component
-22233-22236TCPIn/OutPorts required for the AppFabric Caching Service
-32843-32845TCPInCommunication between Web servers and service applications
-32846TCPIn/OutSharePoint User Code Service
-808-809TCPInOffice Web Apps
-5725TCP