Tuesday, November 23, 2021

How to get attachments of notes in d365FO.

 Hi guys, today we see how to get notes attachments in d365FO. The below method is to return the notes based on the sender table.


        private Notes getAttachments(Common _common) { DocuRef docuRef; DocuType docuType; ; select firstOnly Notes from docuRef order by docuRef.createddatetime desc where docuRef.RefTableId == _common.TableId && docuRef.RefRecId == _common.RecId && docuRef.RefCompanyId == _common.DataAreaId exists join DocuType where DocuType.TypeId == docuRef.TypeId && DocuType.TypeGroup == DocuTypeGroup::Note; return docuRef.Notes; }


Keep Daxing!!

No comments:

Post a Comment