Hi Everyone,
I have the same issue as this answers link.
https://answers.laserfiche.com/questions/69895/Workflow-setting-version-comment
I am new to C# script coding and trying to use the script from Miruna's suggestion as following, but it does not work.
namespace WorkflowActivity.Scripting.Script
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Text;
/// <summary>
/// Provides one or more methods that can be run when the workflow scripting activity is performed.
/// </summary>
public class Script1 : ScriptClass90
{
/// <summary>
/// This method is run when the activity is performed.
/// </summary>
protected override void Execute()
{
// Write your code here.
EntryInfo EI=this.BoundEntryInfo;
FieldValueCollection FVC=EI.GetFieldValues();
FVC.Add("FIELDNAME","FIELDVALUE");
EI.Lock(LockType.Exclusive);
EI.SetFieldValues(FVC);
EI.Comment="COMMENT";
EI.Save();
EI.Unlock();
}
}
}
How can I achieve the above,please suggest.
Thanks in advance.