Thanks, Kevin. I did read that post, but since all my existing scripts are written in visual basic, I'm not able to easily modify it. I'm trying to get a quick fix for an exception to the rule. My documents only have a textbox annotation that was added in a previous workflow. I need to pull the ID as the delete method uses that, not annotation type. If I knew the ID I could simply write that into my code and be done with it.
So...here is my script - it doesn't work - it get's this error message - Error 1 Argument not specified for parameter 'itemId' of 'Public Function GetAnnotation(itemId As Integer) As Laserfiche.RepositoryAccess.AnnotationBase'. \SDKScript\Script 1.vb 29 RemoveTextBox
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.SDKScript
'''<summary>
'''Provides one or more methods that can be run when the workflow scripting activity is performed.
'''</summary>
Public Class Script1
Inherits RAScriptClass91
'''<summary>
'''This method is run when the activity is performed.
'''</summary>
Protected Overrides Sub Execute()
If Me.BoundEntryInfo.EntryType = EntryType.Document Then
'Get a reference to page 1 of the bound entry...
Dim pInfo As PageInfo = Document.GetDocumentInfo(Me.BoundEntryId, Me.RASession).GetPageInfo(1)
'Find itemID
Dim tAnnotation As Integer = pinfo.GetAnnotation()
pInfo.DeleteAnnotation(tAnnotation)
End If
End Sub
End Class
End Namespace
Thank you, I do appreciate your assistance.