hai,
i want to fetch the notes field from the docuref table in the Purchase order Confirmation Report,
but i didn't find out the Relation Between These two tables,
how to solve these issue.
*This post is locked for comments
hai,
i want to fetch the notes field from the docuref table in the Purchase order Confirmation Report,
but i didn't find out the Relation Between These two tables,
how to solve these issue.
*This post is locked for comments
hai martin,
i am writing this following code i am getting only one note in the Purchase order Report.
select purchTable where purchTable.PurchId == PurchId;
select docuRef
where docuRef.RefTableId == purchTable.TableId
&& docuRef.RefRecId == purchTable.RecId
&& docuRef.TypeId == 'Note';
now tell me where add the "while " in that code.
The relation is exactly the same for more records. If you want to fetch more records, use while select. You'll find details in documentation.
hai qureshi,
it is fine for only one Note in the document handling.
how to get the Two or more Notes.
I marked the verified answer for you, so everybody can see that the problem has been resolved and can easily locate the answer.
Please do it by yourself next time.
thank you it is working.
Every attachment is reference in DocuRef in following relation.
DocuRef.RefTableId
DocuRef.RefRecId
In your case if you are fetching Notes attached to PO.
PurchTable purchTable;
DocuRef docuRefLocal;
select firstonly purchTable where purchTable.PurchId == 'XXXXXX';
select firstonly docuRefLocal
where docuRefLocal.RefTableId == purchTable.TableId
&& docuRefLocal.RefRecId == purchTable.RecId
&& docuRefLocal.TypeId == 'Note';
info(strfmt('%1', docuRefLocal.Notes));
André Arnaud de Cal...
292,884
Super User 2025 Season 1
Martin Dráb
231,760
Most Valuable Professional
nmaenpaa
101,156
Moderator