It looks like you're new here. Sign in or register to get started.
RecordLink.SETRANGE(Type, RecordLink.Type::Note);
Comments
I want to count by per document.
If possible, please advise me the code.
Thank you
Table "Record Link" is based on RecordID and the main part of RecordID is the table part. RecordID field can not be filtered directly and you have to use some trick:
RecRef := YourRecord.GETTABLE;
RecordLink.SETFILTER(RecordID, '%1', FORMAT(RecRef.ID));
and now you are able count resulting recordset.
thank you for the code, appreciate it. It work with some modification :
RecRef := YourRecord.GETTABLE;
RecordLink.SETRANGE(RecordID, RecRef.RECORDID);
So I just added this to count the notes.
Tino Ruijs
Microsoft Dynamics NAV specialist