Hello,
Aside from aggregation (i.e., count, min) is it at all possible to manipulate fields in Query Codeunits?
I'm thinking specifically of using a local procedure (provided by Steven Renders) to pull the notes from a Note field on the Record Link table:
local procedure GetNotesForRecordRef(MyRec: RecordRef): text[250]
var
RecordLink: Record "Record Link";
TypeHelper: Codeunit "Record Link Management";
Result: text;
begin
Clear(RecordLink);
clear(Result);
RecordLink.SetRange("Record ID", MyRec.RecordId());
RecordLink.SetRange(Type, RecordLink.Type::Note);
if RecordLink.FindSet() then
repeat
RecordLink.CalcFields(Note);
Result += TypeHelper.ReadNote(RecordLink);
until RecordLink.Next() = 0;
exit(copystr(Result, 1, 250));
end;
I can't see and obvious way to implement it.