You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
regarding IntegrationEvent OnBeforeSend in table 9500 "Email Item"
can parameter EmailScenario made var?
and
can parameter Enqueue be added as var?
old:
[IntegrationEvent(false, false)]
local procedure OnBeforeSend(var EmailItem: Record "Email Item"; var HideMailDialog: Boolean; var MailManagement: Codeunit "Mail Management"; EmailScenario: Enum "Email Scenario"; var Result: Boolean; var IsHandled: Boolean)
begin
end;
new:
[IntegrationEvent(false, false)]
local procedure OnBeforeSend(var EmailItem: Record "Email Item"; var HideMailDialog: Boolean; var MailManagement: Codeunit "Mail Management"; var EmailScenario: Enum "Email Scenario"; var Enqueue: Boolean; var Result: Boolean; var IsHandled: Boolean)
begin
end;
Old:
procedure Send(HideMailDialog: Boolean; EmailScenario: Enum "Email Scenario"; Enqueue: Boolean) Result: Boolean
var
MailManagement: Codeunit "Mail Management";
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeSend(Rec, HideMailDialog, MailManagement, EmailScenario, Result, IsHandled);
if IsHandled then
exit(Result);
MailManagement.SendMailOrDownload(Rec, HideMailDialog, EmailScenario, Enqueue);
exit(MailManagement.IsSent());
end;
New:
procedure Send(HideMailDialog: Boolean; EmailScenario: Enum "Email Scenario"; Enqueue: Boolean) Result: Boolean
var
MailManagement: Codeunit "Mail Management";
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeSend(Rec, HideMailDialog, MailManagement, EmailScenario, Enqueue, Result, IsHandled);
if IsHandled then
exit(Result);
MailManagement.SendMailOrDownload(Rec, HideMailDialog, EmailScenario, Enqueue);
exit(MailManagement.IsSent());
end;
Additional context
so we can overwrite the EmailScenario in some cases
and/or we can set IsHandled to true but then we needed to know the value of Enqueue to call MailManagement.SendMailOrDownload ourself
Describe the request
regarding IntegrationEvent OnBeforeSend in table 9500 "Email Item"
can parameter EmailScenario made var?
and
can parameter Enqueue be added as var?
old:
[IntegrationEvent(false, false)]
local procedure OnBeforeSend(var EmailItem: Record "Email Item"; var HideMailDialog: Boolean; var MailManagement: Codeunit "Mail Management"; EmailScenario: Enum "Email Scenario"; var Result: Boolean; var IsHandled: Boolean)
begin
end;
new:
[IntegrationEvent(false, false)]
local procedure OnBeforeSend(var EmailItem: Record "Email Item"; var HideMailDialog: Boolean; var MailManagement: Codeunit "Mail Management"; var EmailScenario: Enum "Email Scenario"; var Enqueue: Boolean; var Result: Boolean; var IsHandled: Boolean)
begin
end;
Old:
procedure Send(HideMailDialog: Boolean; EmailScenario: Enum "Email Scenario"; Enqueue: Boolean) Result: Boolean
var
MailManagement: Codeunit "Mail Management";
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeSend(Rec, HideMailDialog, MailManagement, EmailScenario, Result, IsHandled);
if IsHandled then
exit(Result);
MailManagement.SendMailOrDownload(Rec, HideMailDialog, EmailScenario, Enqueue);
exit(MailManagement.IsSent());
end;
New:
procedure Send(HideMailDialog: Boolean; EmailScenario: Enum "Email Scenario"; Enqueue: Boolean) Result: Boolean
var
MailManagement: Codeunit "Mail Management";
IsHandled: Boolean;
begin
IsHandled := false;
OnBeforeSend(Rec, HideMailDialog, MailManagement, EmailScenario, Enqueue, Result, IsHandled);
if IsHandled then
exit(Result);
MailManagement.SendMailOrDownload(Rec, HideMailDialog, EmailScenario, Enqueue);
exit(MailManagement.IsSent());
end;
Additional context
so we can overwrite the EmailScenario in some cases
and/or we can set IsHandled to true but then we needed to know the value of Enqueue to call MailManagement.SendMailOrDownload ourself
Internal work item: AB#538782
The text was updated successfully, but these errors were encountered: