Record.EditDocument

I spend as little time with the COM SDK as possible but apparently it had the method Record.EditDocument which would check a document out to Offline Records and open it for editing.  This no longer exists in the .Net SDK but you can still achieve the same end. Here is a simple sample.

using (Database database = new Database())
{
    database.WorkgroupServerName = "local";
    database.Id = "I1";
    database.Connect();

    Record record = new Record(database, 9000000001);

    OfflineRecord offline = new OfflineRecord(record, true);
    System.Diagnostics.Process.Start(offline.FullFileName);
}

Auto Checkin

If you want to auto check the document in once you have finished editing then call the SetAutoCheckin() methd, for example:

using (Database database = new Database())
{
    database.WorkgroupServerName = "local";
    database.Id = "I1";
    database.Connect();

    Record record = new Record(database, "REC_15");
    
    OfflineRecord offline = new OfflineRecord(record, true);
    record.SetAutoCheckin(offline.FileName);

    System.Diagnostics.Process.Start(offline.FullFileName);
}
Written on April 21, 2016