Project Server 2013 : Retrieve selected projects from the Project Center View on PWA Ribbon RRS feed

  • Question

  • Hi,

    I need to get Project IDs of the selected projects from Project Center View on the click of a PWA Ribbon control.

    I have referred this link

    But somehow I'm not able to get the _grid object.

    Any help is appreciated.



    Monday, March 16, 2015 9:31 AM

All replies

  • Hi,

    Got this resolved in PS2013 by using below code.

    From the link I was referring got info that PJ.ProjectCenterSatellite does not exist in PS2013. Instead use the method projectCenterComponent.get_GridSatellite().GetJsGridControlInstance().GetSelectedRecordKeys(false) to retrieve selected project.

    /// <reference name="MicrosoftAjax.js"/>
    /// <reference path="~/_layouts/inc/pwa/library/shell.js"/>
    /// <reference path="~/_layouts/SP.Core.js"/>
    /// <reference path="~/_layouts/ps.core.js"/>
    /// <reference path="~/_layouts/ps.projectmanagers.js"/>
    /// <reference path="~/_layouts/JsGrid.js"/>
    /// <reference path="~/_layouts/JsGrid.Gantt.js"/>

    var Temp_PCE;             // Contains the Project Center extension object.


    function Temp_PCE_Main() {
       Temp_PCE = new Temp_GetPCE();

    function Temp_GetPCE() {
        this.GetSelectedProject = function () {
            selection = projectCenterComponent.get_GridSatellite().GetJsGridControlInstance().GetSelectedRecordKeys(false);
            if (selection.length == 0) {
                alert('Please select a project.');
            else if (selection.length > 1) {
                alert('Please select one project.');
            else {
                return selection[0];
            return null;




    Tuesday, March 17, 2015 6:25 AM