WorkflowActivities.ReadIntegerProperty メソッド
SharePoint のSPFieldType.Integer型を使用して、指定したプロジェクトのプロパティの値を読み取ります。
名前空間: Microsoft.ProjectServer.Client
アセンブリ: Microsoft.ProjectServer.Client (Microsoft.ProjectServer.Client.dll 内)
構文
'宣言
<RemoteAttribute> _
Public Function ReadIntegerProperty ( _
projectId As Guid, _
propertyId As String _
) As ClientResult(Of Integer)
'使用
Dim instance As WorkflowActivities
Dim projectId As Guid
Dim propertyId As String
Dim returnValue As ClientResult(Of Integer)
returnValue = instance.ReadIntegerProperty(projectId, _
propertyId)
[RemoteAttribute]
public ClientResult<int> ReadIntegerProperty(
Guid projectId,
string propertyId
)
パラメーター
projectId
型: System.Guidプロジェクトの GUID。
propertyId
型: System.String読み取りプロパティの GUID。
戻り値
型: Microsoft.SharePoint.Client.ClientResult<Int32>
Integerプロパティの値。
注釈
Project Server ワークフローには、 ReadIntegerPropertyメソッドを呼び出すことができます。propertyIdの有効な値は、 WorkflowDesignerField.Idプロパティを使用して、 WorkflowDesigner.Fieldsのコレクションから取得できます。ReadIntegerPropertyメソッドは、 WorkflowDesignerField.SPFieldTypeプロパティがSPFieldType.Integerであるフィールドでのみ機能します。
注意
フィールド、オプティマイザーの決定を読み取り、プロジェクト ポートフォリオ分析が完了していない場合は失敗します。値を読み取る前に、プロジェクトがコミットされていることを確保するには、ワークフロー コミット アクティビティの待機を設定できます。
たとえば、ポートフォリオ分析 (すべて 1 行で) でコミットはありませんプロジェクトで、次のような他のクエリを使用します。
https://ServerName/pwa/_api/ProjectServer/WorkflowActivities/
ReadIntegerProperty(projectId='<YOUR-PROJID>',propertyId='Optimizer%20Decision')
null 参照 (Visual Basic のNothing )である場合、オプティマイザーの決定のフィールド、クエリ、次の結果を使用できます。
PJClientCallableException: WorkflowActivityInvalidArgument WorkflowActivityInvalidArgument
Error = Project property not found: propertyName = Optimizer Decision,
mdPropUid = 00000000-0000-0000-0000-000000000000