[Event Request] Codeunit 260 - OnBeforeGetAttachmentFileName
New event in Codeunit 260 Document-Mailing
[IntegrationEvent(false, false)]
local procedure OnBeforeGetAttachmentFileName(Var AttachmentFileName: Text[250]; PostedDocNo: Code[20]; EmailDocumentName: Text[250]; ReportUsage: Integer)
begin
end;
Placed at the beginning of GetAttachmentFileName, before the check:
procedure GetAttachmentFileName(var AttachmentFileName: Text[250]; PostedDocNo: Code[20]; EmailDocumentName: Text[250]; ReportUsage: Integer)
var
ReportSelections: Record "Report Selections";
begin
//<< New
OnBeforeGetAttachmentFileName(AttachmentFileName, PostedDocNo, EmailDocumentName, ReportUsage);
//>> New
if AttachmentFileName = '' then
This function already available for extensions, why you need event here? Can you simply call it?
So we can set/overwrite the AttachmentFileName when this function is called elsewhere, depending on our own conditions.
Yes, you have all needed parameters in this function
I know we have the parameters, I know how the function works, I know it's available for use by extensions.
We don't want to call this function directly, we want to set the AttachmentFileName in the function when it is called by other code. This is part of a solution we have, and at the moment, we have to manually add this event in C/AL for our solution to work.
Assigning to right team: @JesperSchulz, @AndreiPanko
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.
Thanks for submitting this issue. We will publish a fix for it in the next minor update for release 15.
Thanks for submitting this issue. We will publish a fix for it in the next minor update for release 15.
Thanks for submitting this issue. We will publish a fix for it in the next minor update for release 15.