asked on June 7, 2018
        
When running the below code, the Client opens, the search runs, and the results are displayed. There are 3 results. However, the count inside the "results" variable is 0 so iterating through them and opening the documents with the IDs inside does nothing. Am I doing something wrong?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Laserfiche.ClientAutomation;
namespace OpenDocsWithSDKTest
{
    class Program
    {
        static void Main(string[] args)
        {
            OpenDocumentSample();
        }
        static MainWindow LaunchClientSample2()
        {
            LaunchOptions launchOptions = new LaunchOptions();
            launchOptions.ServerName = "server";
            launchOptions.RepositoryName = "repository";
            using (ClientManager clientMgr = new ClientManager())
            {
                MainWindow mainWindow = null; // mainWindow represents the folder browser window
                clientMgr.LogIn(launchOptions, out mainWindow);
                return mainWindow;
            }
        }
        static void OpenDocumentSample()
        {
            MainWindow mainWindow = LaunchClientSample2();
            SearchOptions so = new SearchOptions();
            so.NewWindow = false;
            so.Query = @"{LF:Name=""*"",type=D} & {LF:Tags=""MyTag""}";
            var results = new List<int>();
            results = mainWindow.LaunchSearch(so) as List<int>;
            OpenOptions options = new OpenOptions();
            options.OpenStyle = DocumentOpenType.DocumentViewer;
            foreach (var ID in results)
            {
                mainWindow.OpenDocumentById(ID, options);
            }
            Console.WriteLine(results.Count());
        }
    }
}
            
                                    
                                    
                                        0
                                    
                                        
                                            0