Skip to content

[Event Requet] Table 60 "Document Sending Profile".TrySendToEMail #29809

@fridrichovsky

Description

@fridrichovsky

Why do you need this change?

We need skip sending email and we choosed place for option chande ShowDialog variable and we plan change e-mait attachment do new custom value that will create file in temp folder for SharePoint. True is that I can for this use event OnBeforeTrySendToEMail. I missed this event.

Describe the request

Please add new parameter to event

    procedure TrySendToEMail(ReportUsage: Integer; RecordVariant: Variant; DocumentNoFieldNo: Integer; DocName: Text[150]; CustomerFieldNo: Integer; ShowDialog: Boolean)
    var
        Handled: Boolean;
        IsCustomer: Boolean;
    begin
        IsCustomer := true;
        //--------------------------- OnBeforeTrySendToEMail:BEGIN
        //OnBeforeTrySendToEMail(ReportUsage, RecordVariant, DocumentNoFieldNo, DocName, CustomerFieldNo, ShowDialog, Handled, IsCustomer);
        OnBeforeTrySendToEMail(ReportUsage, RecordVariant, DocumentNoFieldNo, DocName, CustomerFieldNo, ShowDialog, Handled, IsCustomer, Rec);
        //--------------------------- OnBeforeTrySendToEMail:END
        if Handled then
            exit;

        if ShowDialog then
            "E-Mail" := "E-Mail"::"Yes (Prompt for Settings)"
        else
            "E-Mail" := "E-Mail"::"Yes (Use Default Settings)";

        "E-Mail Attachment" := "E-Mail Attachment"::PDF;

        TrySendToEMailGroupedMultipleSelection(
            "Report Selection Usage".FromInteger(ReportUsage), RecordVariant, DocumentNoFieldNo, DocName, CustomerFieldNo, IsCustomer);
    end;


    [IntegrationEvent(false, false)]
    //--------------------------- OnBeforeTrySendToEMail:BEGIN
    //local procedure OnBeforeTrySendToEMail(ReportUsage: Integer; RecordVariant: Variant; DocumentNoFieldNo: Integer; DocName: Text[150]; CustomerFieldNo: Integer; var ShowDialog: Boolean; var Handled: Boolean; var IsCustomer: Boolean)
    local procedure OnBeforeTrySendToEMail(ReportUsage: Integer; RecordVariant: Variant; DocumentNoFieldNo: Integer; DocName: Text[150]; CustomerFieldNo: Integer; var ShowDialog: Boolean; var Handled: Boolean; var IsCustomer: Boolean;var DocumentSendingProfile: Record "Document Sending Profile")
    //--------------------------- OnBeforeTrySendToEMail:END
    begin
    end;

Internal work item: AB#624768

Metadata

Metadata

Assignees

No one assigned

    Labels

    FinanceGitHub request for Finance areaevent-requestRequest for adding an eventships-in-future-updateFix ships in a future update

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions