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

[Event Request] - Codeunit Email Scenario Attach Impl - OnAfterInsertEmailAttachments #27848

Open
DanielHaglo opened this issue Dec 23, 2024 · 0 comments
Labels
event-request Request for adding an event Integration GitHub request for Integration area

Comments

@DanielHaglo
Copy link

DanielHaglo commented Dec 23, 2024

Describe the request

local procedure InsertEmailAttachments(EmailScenarioAttachments: Record "Email Scenario Attachments"; var EmailAttachment: Record "Email Attachments"; EmailScenario: Integer)
begin
EmailAttachment.Id := EmailScenarioAttachments.Id;
EmailAttachment."Attachment Name" := EmailScenarioAttachments."Attachment Name";
EmailAttachment."Email Attachment" := EmailScenarioAttachments."Email Attachment";
EmailAttachment.AttachmentDefaultStatus := EmailScenarioAttachments.AttachmentDefaultStatus;
EmailAttachment.Scenario := Enum::"Email Scenario".FromInteger(EmailScenario);
//NewEvent
OnInsertEmailAttachmentsOnBeforeEmailAttachmentInsert(EmailAttachment,EmailScenarioAttachments);
//newevent
EmailAttachment.Insert();
end;

[IntegrationEvent(false, false)]
local procedure OnInsertEmailAttachmentsOnBeforeEmailAttachmentInsert(var EmailAttachment: Record "Email Attachments";EmailScenarioAttachments: Record "Email Scenario Attachments")
begin
end;

Additional context

there is no init on EmailAttachment record, therefor we need an event to clear values because we have fields on this record.
When in page, the EmailAttachment-variable will adopt fields from the record the user is currently on
Internal work item: AB#561285

@JakovljevicDusan JakovljevicDusan added event-request Request for adding an event Integration GitHub request for Integration area labels Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
event-request Request for adding an event Integration GitHub request for Integration area
Projects
None yet
Development

No branches or pull requests

2 participants