We have a workflow where we want to identify all folders that are on hold, and capture the hold reason. We are able to identify the search criteria to identify folders on hold, but can anyone tell us how to capture the hold reason in a token to be used later?
Question
Question
get hold reason in token
Replies
Are you referring to "Checked Out" documents?
Because the Search Repository activity has the ability to select the "Additional Properties" you want to include as tokens with the search results, and "Check Out Comment" is one of the available options.
Okay, after reading some more, I'm guessing that Holds are either something we have never enabled or a functionality that perhaps doesn't exist in the Windows Client version 10.2, which is what we use. But I do still wonder if perhaps the "Hold Reason" is available in that list of "Additional Properties" on the Search Repository activity...
Sorry - this was probably not helpful at all.
Thank you for your response. I think we may have tried this option, and it did not provide the information we were looking for, but we will look again today.
In the SDK, Holds are known as Freezes. To get all freezes and all frozen entries, use Freeze.EnumAll:
List<int> frozenEntryIds = new List<int>(); foreach (FreezeInfo fi in Freeze.EnumAll(session)) { foreach (FrozenEntry fe in fi.FrozenEntries) { if (!frozenEntryIds.Contains(fe.EntryId)) frozenEntryIds.Add(fe.EntryId); } }
Thank you for this. We are really new to Laserfiche, and have not done work with the SDK in what you have shown here. But this seems helpful. We will look into how this can work for us.
Thanks, Robert -
If we also wanted the Freeze reason (to retrieve or set) we would use fe.Reason?
We needed to get the Freeze information for a single document, so we translated your code into:
Dim DocEntry As DocumentInfo = Nothing DocEntry = Entry.TryGetEntryInfo(LF_DocID, LF_Session) Dim FR As FreezeCollection = Freeze.GetFreezes(DocEntry.Id, LF_Session) For Each FI As FreezeInfo In FR Dim FR_Reason As String = FI.Reason MsgBox(FR_Reason) Next
We already had the Doc id...