Hello,
What do you want to increment? value of hte field after each update ?
if yes, then you have here the custom handler class which will be increment your field:
using System;
using CMS.Base;
using CMS.DocumentEngine;
[DocumentCustomHandler]
public partial class CMSModuleLoader
{
private class DocumentCustomHandler : CMSLoaderAttribute
{
public override void Init()
{
DocumentEvents.Update.Before += Document_Update_Before;
}
private void Document_Update_Before(object sender, DocumentEventArgs e)
{
TreeNode doc = e.Node;
if (doc.ClassName.ToLower() == "yourdocumentclassname")
{
int oldValue = doc.GetValue<int>("IncrementationField", 0);
e.Node.SetValue("IncrementationField", oldValue++);
}
}
}
}