Hi Everyone,
I’m creating a processing form to process SOLines based on some functionality, a part of the code is to set the Line note for each SOLine. i tried joining the SOLine to Note table on NoteID. and tried a second way to update the Note table on the database:
var note = PXSelect<Note,
Where<Note.noteID, Equal<Required<Note.noteID>>>>
.Select(graph, soLine.NoteID)
.FirstOrDefault()?.GetItem<Note>();
var lineNoteText = "...........";
note.NoteText = lineNoteText;
a “Null Object reference” raised for the note variable. so i thought to use the seconde one:
PXDatabase.Update<Note>(
new PXDataFieldAssign<Note.noteText>(lineNoteText),
new PXDataFieldRestrict<Note.noteID>(soLine.NoteID)
);
none of them worked…
any thoughts?