This simple JavaScript solution starter enables you to select projects that are related and add those project names to a project level custom field all from a Project Detail Page. The script will need updating to reference the correct project level field internal name, but this is covered in the supporting blog post.

 A code snippet can be seen below - full code available in the download:


//get the project datafunction LoadProjectData() {var data = $.ajax({url: _spPageContextInfo.siteAbsoluteUrl + "/_api/ProjectServer/Projects()?" 
                                    + "&$select=Name", 
                                    type: "GET", 
                                    dataType: "json", 
                                    headers: {Accept: "application/json;odata=verbose"}}); 
        data.done(function (data,textStatus, jqXHR){ 
                                results = data.d.results; 
                                for (var i = 0, len = results.length; i < len; i++) {var result = results[i]; 
        }); (jqXHR,textStatus,errorThrown){ 
            alert("Error retrieving project data: " + jqXHR.responseText + "\n\n Project data will not load"); 
function populateSelectOptions() {var select = document.getElementById("availableProjects");


Here is a link to the supporting blog post that details the requirements to use this solution starter script:

The script is provided "As is" with no warranties etc.