none
PSI - change resource Default Booking Type and Current Max.Units RRS feed

  • Question

    • When a new resource is added into Project Server, they come in as 100% and Committed. Is there a way to change this so that they defaulted to 80% and Proposed with PSI ? Can anyone provide a code example?


    tatiana



    Thursday, June 11, 2015 10:07 PM

Answers

  •            

     

     updateDs.Tables["Resources"].Rows[0]["RES_BOOKING_TYPE"] = (int)PSLibrary.Resource.BookingType.Proposed;

                SvcResource.ResourceDataSet.ResourceAvailabilitiesRow resAvailRow = updateDs.ResourceAvailabilities.NewResourceAvailabilitiesRow();

                resAvailRow.RES_UID = resourceRow.RES_UID;
                resAvailRow.SetRES_AVAIL_FROMNull();
                resAvailRow.SetRES_AVAIL_TONull();
                resAvailRow.RES_AVAIL_UNITS = 80;
                updateDs.ResourceAvailabilities.AddResourceAvailabilitiesRow(resAvailRow);

    or

    updateDs.Tables["Resources"].Rows[0]["RES_BOOKING_TYPE"] = (int)PSLibrary.Resource.BookingType.Proposed;
                updateDs.Tables["ResourceAvailabilities"].Rows[0]["RES_AVAIL_UNITS"] = 80;


    tatiana


    Tuesday, June 16, 2015 5:35 PM