Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Email] Fix OnBeforeGetEmailAttachmentsByEmailScenarios #3064

Closed
wants to merge 8 commits into from
12 changes: 12 additions & 0 deletions src/System Application/App/Email/src/Email/Email.Codeunit.al
Original file line number Diff line number Diff line change
Expand Up @@ -705,9 +705,21 @@ codeunit 8901 Email
/// </summary>
/// <param name="EmailScenarioAttachments">The record to add filters to.</param>
[IntegrationEvent(false, false)]
internal procedure OnBeforeGetEmailAttachments(var EmailScenarioAttachments: Record "Email Scenario Attachments")
begin
end;

#if not CLEAN27
/// <summary>
/// Integration event that allows adding filters to the Email Scenario Attachments before they are retrieved.
/// </summary>
/// <param name="EmailScenarioAttachments">The record to add filters to.</param>
[IntegrationEvent(false, false)]
[Obsolete('This event is being removed. Use OnBeforeGetEmailAttachments instead.', '27.0')]
internal procedure OnBeforeGetEmailAttachmentsByEmailScenarios(EmailScenarioAttachments: Record "Email Scenario Attachments")
begin
end;
#endif

#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ codeunit 8902 "Email Scenario Attach Impl."
EmailScenarioAttachments: Record "Email Scenario Attachments";
Email: Codeunit Email;
begin
Email.OnBeforeGetEmailAttachments(EmailScenarioAttachments);
#if not CLEAN27
#pragma warning disable AL0432
Email.OnBeforeGetEmailAttachmentsByEmailScenarios(EmailScenarioAttachments);
#pragma warning restore AL0432
#endif
if EmailScenario <> 0 then
EmailScenarioAttachments.SetRange(Scenario, Enum::"Email Scenario".FromInteger(EmailScenario));

Expand Down
Loading