Ok, I've been banging my head on the wall for a few days now... I can't see anything wrong with this script, but when I try to test it I get "The object must have its connection set before it can be used." It seems to be based on the call to RASession, but I can't seem to determine what I'm doing wrong.
namespace WorkflowActivity.Scripting.SDKScript
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using Laserfiche.RepositoryAccess;
using System.IO;
using System.Linq;
using Microsoft.VisualBasic.FileIO;
using System.Text.RegularExpressions;
using System.Globalization;
/// <summary>
/// Provides one or more methods that can be run when the workflow scripting activity is performed.
/// </summary>
public class ReportLoader : RAScriptClass102
{
/// <summary>
/// This method is run when the activity is performed.
/// </summary>
protected override void Execute()
{
DocumentInfo doc = Document.GetDocumentInfo(this.BoundEntryId, RASession);
string documentName = doc.Name;
}
}
}
Running the workflow with the script gives a "Object reference not set to an instance of an object."
So what obvious thing am I missing here?