Below is a method that creates an OnBase note which is attached to the doc being processed.
It accepts a string which will the text that is meant to show in the note.
private void createNote(string noteText)
{
//Create a Note with the error message
NoteType noteType = _app.Core.NoteTypes.Find("<note type>");
NoteModifier noteMod = _args.Document.CreateNoteModifier();
//Properties of the Note
NoteProperties noteProps = noteMod.CreateNoteProperties();
noteProps.Text = "Validation Issue" + Environment.NewLine + "Error Message: "+ noteText;
//Create the New Note
Note newNote = noteType.CreateNote(noteProps);
noteMod.AddNote(newNote);
noteMod.ApplyChanges();
//_app.Diagnostics.Write("Note Added");
}
It accepts a string which will the text that is meant to show in the note.
private void createNote(string noteText)
{
//Create a Note with the error message
NoteType noteType = _app.Core.NoteTypes.Find("<note type>");
NoteModifier noteMod = _args.Document.CreateNoteModifier();
//Properties of the Note
NoteProperties noteProps = noteMod.CreateNoteProperties();
noteProps.Text = "Validation Issue" + Environment.NewLine + "Error Message: "+ noteText;
//Create the New Note
Note newNote = noteType.CreateNote(noteProps);
noteMod.AddNote(newNote);
noteMod.ApplyChanges();
//_app.Diagnostics.Write("Note Added");
}