How can I set StatusingSettings via PSI?
-
2012年3月28日 7:37
Hi,
how can I set this "StatusingSettingsDataSet.StatusingSettingsRow.WADMIN_PROTECT_ACTUALS Property" via PSI?
The StatusingSettings set the properties for http://ServerName/ProjectServerName/_layouts/pwa/Admin/Statusing.aspx like described here:
Is it possible to set this property only? Or do I have to set the whole Row?
I'm trying the following (complete row)...
using backendAdmin = SvcAdmin;
...
private static backendAdmin.AdminClient _adminClient;
...
backendAdmin.StatusingSettingsDataSet dsDelta = new backendAdmin.StatusingSettingsDataSet(); dsDelta.StatusingSettings.AddStatusingSettingsRow(<many parameters>); _adminClient.UpdateStatusingSettings(dsDelta);
Where can I get the WADMIN_UIDFAKE?
Best regards,
Björn
- 移動 Christophe FiessingerMicrosoft Employee, Owner 2012年3月28日 20:22 topic (From:Project Server General Questions and Answers)
すべての返信
-
2012年3月29日 7:32Anyone an idea?
-
2012年4月2日 14:18
Hi BjornBo,
The field WADMIN_PROTECT_ACTUALS is used for restrict updates only via PWA or not.
So, you should update the only row in StatusingDataset instead of add a new row.
Youy should read row settings using ReadStatusinSettings, modify the field StatusingSettingsDataSet.StatusingSettingsRow.WADMIN_PROTECT_ACTUALS and update this using UpdateStatusingSettings
I hope this can helps you,
Best Regards,
Paolo O.
- 回答としてマーク BjörnBo 2012年4月5日 8:57
-
2012年4月5日 8:59
Hi Paolo,
that's exactly what I was searching for. Thank you.
I created this method and it works fine:
private void setProtectActuals(byte state) { backendAdmin.StatusingSettingsDataSet dsDelta = _adminClient.ReadStatusingSettings(); backendAdmin.StatusingSettingsDataSet.StatusingSettingsDataTable dtStatusingSettings = (backendAdmin.StatusingSettingsDataSet.StatusingSettingsDataTable)dsDelta.Tables[0]; SvcAdmin.StatusingSettingsDataSet.StatusingSettingsRow row = dtStatusingSettings[0]; row.WADMIN_PROTECT_ACTUALS = state; _adminClient.UpdateStatusingSettings(dsDelta); }
Best regards
Björn
- 回答としてマーク BjörnBo 2012年4月5日 9:00