Skip to content

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

@DELNicoJdl

Description

@DELNicoJdl

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

Metadata

Metadata

Assignees

Labels

ApprovedThe issue is approvedBCIdeaIssue related to a BCIdeaIntegrationGitHub request for Integration areaLinkedIssue is linked to a Azure Boards work item

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions