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

[BC Idea]: Add event OnBeforeGetScenario in codeunit 8892 "Email Scenario Impl." in procedure GetDefaultAccount #2089

Open
1 task done
DELNicoJdl opened this issue Sep 24, 2024 · 4 comments
Assignees
Labels
Approved The issue is approved BCIdea Issue related to a BCIdea Integration GitHub request for Integration area Linked Issue is linked to a Azure Boards work item

Comments

@DELNicoJdl
Copy link

DELNicoJdl commented Sep 24, 2024

BC Idea Link

https://experience.dynamics.com/ideas/idea/?ideaid=e793a3bc-4a7a-ef11-a4e5-6045bdb9fcc9

Description

Hello,

Could it be possible to add the event OnBeforeGetScenario(EmailAccount,IsHandled) in procedure GetDefaultAccount in codeunit 8892 "Email Scenario Impl."

local procedure GetDefaultAccount(var EmailAccount: Record "Email Account")
var
    Scenario: Record "Email Scenario";
begin
    if not Scenario.Get(Enum::"Email Scenario"::Default) then
        exit;

    EmailAccount."Account Id" := Scenario."Account Id";
    EmailAccount.Connector := Scenario.Connector;
end;

Become :

local procedure GetDefaultAccount(var EmailAccount: Record "Email Account")
var
    Scenario: Record "Email Scenario";
begin
    OnBeforeGetScenario(EmailAccount,IsHandled);
    if IsHandled then exit;
    if not Scenario.Get(Enum::"Email Scenario"::Default) then
        exit;

    EmailAccount."Account Id" := Scenario."Account Id";
    EmailAccount.Connector := Scenario.Connector;
end;

[IntegrationEvent(false, false)]
local procedure OnBeforeGetScenario(var EmailAccount: Record "Email Account"; var IsHandled: Boolean)
begin
end;

This event would able us to define a generic sender email by user.
The idea is to have one default email account per group of user.

microsoft/ALAppExtensions#26539

I will provide the implementation for this BC Idea

  • I will provide the implementation for this BC Idea
    Internal work item: AB#550541
@DELNicoJdl DELNicoJdl added the BCIdea Issue related to a BCIdea label Sep 24, 2024
@duichwer
Copy link

Why an event and not an extension via an PR for the System Application?

@bcbuild-github-agent bcbuild-github-agent added the Linked Issue is linked to a Azure Boards work item label Sep 27, 2024
@JesperSchulz
Copy link
Contributor

I would agree with @duichwer here. This sounds more of a capability you should add to the email module, that it sounds like a capability you should extend the module with.
Would you be willing to contribute the capability rather than getting the extensibility point?

@DELNicoJdl
Copy link
Author

Yes I totally agree, and I can contribute to it.

@JesperSchulz JesperSchulz added the Approved The issue is approved label Sep 30, 2024
@JesperSchulz JesperSchulz added the Integration GitHub request for Integration area label Sep 30, 2024
@JesperSchulz
Copy link
Contributor

Approved then! Looking forward to the PR 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved The issue is approved BCIdea Issue related to a BCIdea Integration GitHub request for Integration area Linked Issue is linked to a Azure Boards work item
Projects
None yet
Development

No branches or pull requests

4 participants