Hi
I'm using Business Central and I have a problem regarding creating notes thorough code. When the notes are created. They're not shown in the factbox.
It says: "the data cannot be shown because it is not valid"
The code I'm using is:
if not RecordLink.get(LinkID) then begin
RecordLink.Init();
RecordLink.Validate("Record ID", ServiceHdr.RecordId);
RecordLink.Validate("Link ID", LinkID);
RecordLink.Validate(Type, RecordLink.Type::Note);
RecordLink.Validate(Created, CurrentDateTime);
RecordLink.Validate(Company, CompanyName);
RecordLink.Validate("User ID", UserId);
RecordLink.Validate(Description, Rec.Description);
RecordLink.Note.CreateOutStream(OutStr);
OutStr.Write(Rec.ExtTextL);
RecordLink.Insert();
end;