I am trying to implement a form that will allow a department to manage who can view certain folders. As part of that process I'm trying to implement a workflow that will add a Windows user to a repository group. The workflow fails to add the user with the warning "Trustee not found. [9012]"
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.SDKScriptAddUserToLFGroup '''<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 inUserID As String = GetTokenValue("inUserID")(0) Dim inGroupName As String = GetTokenValue("inGroupName")(0) Dim inGroupAcct As AccountInfo = Account.GetInfo(inGroupName, RASession) Dim inUserAcct As AccountReference = New AccountReference(inUserID, RASession) Dim UserGroup As GroupInfo = CType(inGroupAcct, GroupInfo) UserGroup.AddMember(inUserAcct) UserGroup.Save End Sub End Class End Namespace
It works fine... if I don't execute the Save :)