ITrkNewItem.GetNamedHold (method)

method GetNamedHold
Syntax: Boolean = object.GetNamedHold ( bName, bDesc, bRegion, vExpiration )
Parameters:
bName As String -

Input: Hold Name
bDesc As String -

Output: Hold Description
bRegion As String -

Output: Region or Range where the hold becomes active.
vExpiration As VARIANT* -

Output: Hold Expiration
Description:
The GetNamedHold method allows the user to retrieve a named hold for the item.

Example:

Dim oTrkItem As Object
Dim vTrkItem As Variant
Set oTrkItem = CreateObject("Tracker.TrkNewItem")
oTrkItem.ItemId = "T123"
oTrkItem.ProjectId = "PA1"
oTrkItem.RegionID = "A_TP1"
oTrkItem.ItemTypeId = "ITEMTYPE1"
oTrkItem.RegionLoc = -1
For i = 0 To 10
oTrkItem.CreateNamedHold "MYHOLD_" & Format(i, "00"), "Held to Test " & Format(i, "00"), "$OM_MASTR_BLND", 0
Next i
Dim sDesc As String, sRegion As String, vExpr As Variant
Dim bRetValue As Boolean

For i = 0 To 10
oTrkItem.GetNamedHold "MYHOLD_" & Format(i, "00"), sDesc, sRegion, vExpr
TRACE "MYHOLD_" & Format(i, "00") & " Desc = " & sDesc & " Region = " & sRegion & " Expr = " & vExpr
Next i
oTrkItem.InsertItem vTrkItem