I currently have this vb script that exports an entry as a PDF with the entry ID as the filename. What I need is the entry’s name. Can you help?
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Data.SqlClient
Imports System.Text
Imports Laserfiche.RepositoryAccess
imports Laserfiche.DocumentServices
Namespace WorkflowActivity.Scripting.CopytoimagestoNetworkPathforKofaxScanningSTLIA
'''<summary>
'''Provides one or more methods that can be run when the workflow scripting activity is performed.
'''</summary>
Public Class Script1
Inherits RAScriptClass92
'''<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 ex as new DocumentExporter
dim doc as DocumentInfo = Document.GetDocumentInfo(integer.Parse(GetTokenValue("Entry ID")),RASession)
dim filename as String = Document.GetDocumentInfo(GetTokenValue("Name"),RASession)
ex.ExportPdf(doc, doc.AllPages,PdfExportOptions.None, "\\fsstl06\userdirs\Scanning\Emma_Securian\IA\STL\" & GetTokenValue("Name") & ".pdf")
End Sub
End Class
End Namespace
I've tried variations in which the filename variable was put in there, like this:
dim doc as DocumentInfo = Document.GetDocumentInfo(integer.Parse(GetTokenValue("Entry ID")),RASession)
dim filename as String = Document.GetDocumentInfo(GetTokenValue("Name"),RASession)
ex.ExportPdf(doc, doc.AllPages,PdfExportOptions.None, "\\fsstl06\userdirs\Scanning\Emma_Securian\IA\STL\" & filename & ".pdf")
and this...
dim doc as DocumentInfo = Document.GetDocumentInfo(integer.Parse(GetTokenValue("Entry ID")),RASession)
dim filename as DocumentInfo = Document.GetDocumentInfo(GetTokenValue("Name"),RASession)
ex.ExportPdf(doc, doc.AllPages,PdfExportOptions.None, "\\fsstl06\userdirs\Scanning\Emma_Securian\IA\STL\" & GetTokenValue("Name") & ".pdf")
These all result in a 9001 error of "entry not found" . I don't have a lot of VB experience, surely it's something easy. Thanks for any help.