How do u read a file from laserfiche repository inside the script editor in workflow? Please provide a sample code. I tried using File.Open Read but it it looking for the file in the worklow server.
Thanks
Priya
How do u read a file from laserfiche repository inside the script editor in workflow? Please provide a sample code. I tried using File.Open Read but it it looking for the file in the worklow server.
Thanks
Priya
I get an error "LFDocument" is not defined, 'LFElectFileReadStream' is not defined. What libraries should I reference and should i have to install anything to reference these? Where in the code I specify the repository name that it should look into?
Priya
Can you post your code, please?
If this is still in Workflow, the SDK script activity takes care of the connection to the repository for you (based on the connection profile specified in the Workflow definition).
Thanks. Below is the code:
'Write your code here.
' Dim doc as LFDocument=me.Entry
' Dim Datastream as LFElectFileReadStream =Doc.ElectFile.ReadStream
' Datastream.open()
' Dim content as Byte() =Datastream.ReadData(Datastream.DataLength)
' Dim mem as new MemoryStream(content)
' Datastream.Close()
SetTokenValue("test",content)
Do you have any update on this please? Thanks
This has been mentioned in your previous posts, if you could explain what you are trying to do, we could answer these questions faster and more accurately.
It sounds like you are trying to use LFSO code in Workflow 9.1. LFSO was used in Workflow 9.0 and lower. Workflow 9.1 and higher defaults to using RepositoryAccess instead of LFSO for connecting to Laserfiche. While it is possible to add a reference to LFSO in Workflow 9.1, using RepositoryAccess is more efficient because it is a .Net assembly.
I'm going to guess that you're trying to get the electronic document size.
Repository Access:
dim docInfo as DocumentInfo =me.BoundEntryInfo SetTokenValue("Size",docInfo.ElecDocumentSize)
LFSO:
dim doc as LFDocument = me.Entry SetToken("size",doc.ElectFileSize)
Yes, in the sample code, I am trying to read pdf file and print its size. My ultimate goal is to read the pdf file into a memory stream and send it for signature to Docusign. Thanks.