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

Question

Question

How can I mark a record folder permanent using Workflow script?

asked on October 1, 2021

How can I mark a record folder permanent using Workflow script?  I see a property IsPermanent in the RecordFolderProperties class, but I can't seem find a method for setting it.

0 0

Replies

replied on October 4, 2021

OK fine... it was a newbie question...

For you other LF workflow script newbies out there, here's how I got it to work.

:) Jim.

Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Data.SqlClient
Imports System.Text
Imports Laserfiche.RepositoryAccess

Namespace WorkflowActivity.Scripting.SDKScriptSetPermanent
    '''<summary>
    '''Provides one or more methods that can be run when the workflow scripting activity is performed.
    '''</summary>
    Public Class Script1
        Inherits RAScriptClass104
        '''<summary>
        '''This method is run when the activity is performed.
        '''</summary>
        Protected Overrides Sub Execute()
            'Write your code here. The BoundEntryInfo property will access the entry, RASession will get the Repository Access session
            'Dim BoundDoc as DocumentInfo = BoundEntryInfo
            'BoundDoc.DeleteEdoc()
            'CType(BoundEntryInfo, DocumentInfo).DeleteEdoc()
            'Dim BoundFolderInfo As FolderInfo = CType(BoundEntryInfo, FolderInfo)
            'Dim BoundRecordProperties AS Laserfiche.RepositoryAccess.Records.RecordFolderProperties
            'BoundRecordProperties = BoundFolderInfo.GetRFProperties()
            Dim BoundRecordProperties AS Records.RecordFolderProperties = CType(BoundEntryInfo, FolderInfo).GetRFProperties()
            BoundRecordProperties.DispositionScheduleId = 0
            BoundRecordProperties.IsPermanent = True
            BoundRecordProperties.CutoffCriterionId = 1
            BoundRecordProperties.Save()
        End Sub
    End Class
End Namespace

 

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

Sign in to reply to this post.