You are viewing limited content. For full access, please sign in.

Question

Question

get hold reason in token

asked on June 16, 2021

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?

0 0

Replies

replied on June 16, 2021

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.

0 0
replied on June 16, 2021 Show version history

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.

0 0
replied on June 17, 2021

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.

1 0
replied on June 16, 2021

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);
    }
}

 

0 0
replied on June 17, 2021

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.

0 0
replied on June 28, 2021

Thanks, Robert - 

If we also wanted the Freeze reason (to retrieve or set) we would use fe.Reason?

 

0 0
replied on July 22, 2021

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

 

1 0
replied on July 22, 2021

We already had the Doc id...

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.