I tried SaveAttachment and DeleteAttachment After events and they didn't do anything. They didn't even update the value after 2 saves, like Insert/Update Before.
Here's my code:
private void SaveAttachment_After(object sender, DocumentEventArgs e)
{
var doc = e.Node;
if (doc.Attachments.Count > 0)
{
doc.SetValue("HasAttachments", true);
}
else
{
doc.SetValue("HasAttachments", false);
}
}
}