When you're in charge of a large Project Server deployment, you might face concerns and issues that are due to the project scaling. When I say "large", I mean thousands of users, hundreds of custom fields, tens of project types, PDPs...
In this context, in order to keep a consistency between lookup tables, custom fields or any other objects, I usually use a naming convention such as "lkp_table name", or "organization_customfieldname" for multi-organization deployment. Thus it means that you do need to find a way to display a custom label for those custom fields, different from the name in the system.
 |
| Figure 1: naming convention for lookup tables or custom fields |
It also make sense for out-of-the-box fields such as "project Owner". In many case, the project owner will be a project manager, but it could be a PCO. Thus organizations might want to give a custom label to this native field.
Facing this concern, evenif I'm not a developer, there is an easy way to give custom label. So enjoy it because that will probably be the one and only post I'll ever write about coding. But as you'll see, it is not much difficulty.
We'll make a simple example with the "owner" out-of-the-box field.
 |
| Figure 2: default owner field |
Just open a notepad and write the following code:
var pageMode = 0;
findPageMode();
var arrayOfFindAndReplace = [["owner", "your_custom_label"]];
Replace with your custom label and save the file with the .js (javascript) extension in the shared documents librairy of your PWA instance.
Then edit your PDP from the server settings and add a content editor webpart.
 |
| Figure 3: add a content editor webpart to the PDP |
Edit the webpart then enter the path of your javascript file:
 |
| Figure 4: enter the javascript file's path in the webpart configuration |
Finally just hide the webpart so it won't be displayed while opening the PDP:
 |
| Figure 5: hiding the content editor webpart |
Et voilà!! The native field is "renamed" as you needed to.
 |
| Figure 6: PDP with the new label |
Note that if you have installed language packages, since the code contains the name of the field and not the GUID, you'll need to consider writing in the javascript file the label for custom field in all languages supported on your PWA instance.
**2014-08-01 : need to add a function or it will not work. I'll update the post asap.**