Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

Update Resource Cost rate Using PSI

$
0
0

i am trying to update resource cost rates by using PSI, but the updated rates are not showing"Edit Resource" screen

i found an article that says that there is "a bug in the PSI whereby when an update is made using UpdateResources and it only affects the ResourceRatesDataTable, and none of the other data tables in the dataset, then we were not triggering the versioning increment for the resource. "

http://blogs.technet.com/b/projectsupport/archive/2013/02/12/project-server-resource-rates-changed-with-psi-not-seen-in-project-professional.aspx

but it doesn't list the complete code on how to update rates and i can't figure out how to combine the code they show with the existing code i have.

Does anyone knows how to update rates using PSI? any help is appreciated.

here is what i have so far

 SvcResource.ResourceDataSet.ResourceRatesDataTable rates = updateDs.ResourceRates;

            SvcResource.ResourceDataSet.ResourceRatesRow rates_row = rates.NewResourceRatesRow();

            rates_row.RES_RATE_EFFECTIVE_DATE = new DateTime(2015, 08, 31);
            rates_row.RES_COST_PER_USE = 0;
            rates_row.RES_OVT_RATE = 100;
            rates_row.RES_STD_RATE = 70;
            rates_row.RES_RATE_TABLE = 0;
            rates_row.RES_UID = updateDs.Resources[0].RES_UID;
            rates.AddResourceRatesRow(rates_row);

                                   

resourceSvc.UpdateResources(updateDs, false, false);

       resourceSvc.CheckInResources(new Guid[] { resourceRow.RES_UID }, false);


tatiana




Viewing all articles
Browse latest Browse all 5347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>