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…

Reporting on Microsoft Planner or Microsoft Staffhub!

Reporting on Planner or StaffHub!


For a long time I have been waiting for the reporting API for Planner and Staffhub. Today I got tired of waiting and found another way to do it.

I manage to create a PowerBI report based on all the planner plans I have access to and the same method will work for Staffhub and properly many other services such as Microsoft Tasks, Microsoft Forms, etc. 


How?Easy, but requires some Azure, Flow and PowerBI knowledge. These are the steps to I used: 1.Create an Azure Blob to hold the data 2.Create a Flow to save Planner data in the Blob 3.Access the Blob from PowerBI Azure – Blob!So first, lets create a Blob. No, not that kind of Blob. Access the Azure portal - https://portal.azure.com/ Select New and search for “storage account” Fill out the form and click create. I kept all settings to their default Access the new storage and locate/copy the Storage Account Name and Access Key – you will need this for connections to Flow and PowerBI. Next let’s create a Blob Container an…