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

[Bug]: Adding Filters to the Email Scenario Attachments before they are retrieved EVENT fix (var) #3034

Open
1 task done
DrieVeertien opened this issue Feb 21, 2025 · 0 comments

Comments

@DrieVeertien
Copy link

Describe the issue

In the codeunit 8902 "Email Scenario Attach Impl." - procedure GetEmailAttachmentsByEmailScenarios(var Result: Record "Email Attachments"; EmailScenario: Integer) there is an event called that has its publisher in the codeunit 8901 Email named OnBeforeGetEmailAttachmentsByEmailScenarios.

The description of this event is:
Integration event that allows adding filters to the Email Scenario Attachments before they are retrieved.

This event has a parameter EmailScenarioAttachments: Record "Email Scenario Attachments" but this parameter is not a reference (by var). So every filter set when subscribing to the event is not saved.

Image

Image

Expected behavior

When setting a filter on the record given by the event, it should remember the filters set.

Steps to reproduce

  1. Breakpoint before the call to the event
  2. Subscribe on the event set your filters
  3. Breakpoint behind event
  4. Check filters (they are not save)

Additional context

The code now:

/// <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)] internal procedure OnBeforeGetEmailAttachmentsByEmailScenarios(EmailScenarioAttachments: Record "Email Scenario Attachments") begin end;

Fixed code:

/// <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)] internal procedure OnBeforeGetEmailAttachmentsByEmailScenarios(var EmailScenarioAttachments: Record "Email Scenario Attachments") begin end;

I will provide a fix for a bug

  • I will provide a fix for a bug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant