I am trying to periodically restore the saved attributes for a public kiosk user. Unfortunately, I can't seem to do it with simple serialization. When I execute the following SDK Script I get the message "You must implement a default accessor on Laserfiche.RepositoryAccess.TrusteeAttributeCollection because it inherits from ICollection."
Imports System Imports System.Collections.Generic Imports System.ComponentModel Imports System.Data Imports System.Data.SqlClient Imports System.Text 'Imports System.Xml Imports Laserfiche.RepositoryAccess 'Imports Laserfiche.Serialization Namespace WorkflowActivity.Scripting.SDKScriptResetReaderAttributes '''<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 ReaderAccount As AccountReference = New AccountReference("USERNAME", RASession) Dim ReaderAttributes As TrusteeAttributeCollection = Trustee.GetAttributes(ReaderAccount, RASession) ReaderAttributes.Clear() Dim reader As New System.Xml.Serialization.XmlSerializer(GetType(TrusteeAttributeCollection)) Dim file As New System.IO.StreamReader( "C:\WorkflowAdminFiles\UserAttributes_USERNAME.xml") ReaderAttributes = CType(reader.Deserialize(file), TrusteeAttributeCollection) ReaderAttributes.Save() End Sub End Class End Namespace