[Bug]: Missing access to the Id field of the attachment in the “Email Message Attachment” table via the EMailMessage codeunit (8904) #2038
Labels
Approved
The issue is approved
Bug
Something isn't working
Integration
GitHub request for Integration area
Describe the issue
There is currently no way to determine the ID of an attachment that is attached to a mail. The ID is currently stored in the internal table 8904 “Email Message Attachment”. As the table is internal, you can only access the attachments via the codeunit 8904 “Email Message” and iterate over the attachments with the functions Attachments_First() and/or Attachments_Next(). There are other methods in the codeunit that can be used to access the name of the attachment, for example. Unfortunately, several attachments can have the same name so that they cannot be clearly identified.
Identification would be possible via the Id field of the “EMail Message Attachment” table. However, there is no function in the implementation codeunit 8904 that returns the Id. Such an addition would provide considerable added value in identifying the correct attachment of the mail.
I would like to add to the code so that this is possible in the future.
Expected behavior
I would expect to have a method available via codeunit 8904 “EMail Message” that returns the ID of the current attachment.
Steps to reproduce
As you can see in the screenshot, you can access some methods in the codeunit, but the ID of the attachment remains internal.
Additional context
No response
I will provide a fix for a bug
The text was updated successfully, but these errors were encountered: