ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] table 295 "Reminder Header" - InsertTextLines procedure

Open dorinbirsan opened this issue 1 year ago • 4 comments

Why do you need this change?

Describe the request

The current change would benefit the fact that when inserting a ReminderLine inside the procedure InsertTextLines from the table 295 "Reminder Header", we can avoid breaking behavior by making the code extensible as it already was in the procedure: procedure InsertTextLines(var ReminderHeader: Record "Reminder Header"; var ReminderText: Record "Reminder Text"; var NextLineNo: Integer; LineSpacing: Integer)

Current:

    procedure InsertTextLines(var LocalReminderHeader: Record "Reminder Header"; var ReminderAttachmentText: Record "Reminder Attachment Text"; LineType: Enum "Reminder Line Type"; var NextLineNumber: Integer; LineSpace: Integer)
    var
        ReminderAttachmentTextLine: Record "Reminder Attachment Text Line";
        ReminderCommunication: Codeunit "Reminder Communication";
    begin
        if not ReminderAttachmentText.IsEmpty() then begin

        ....

                ReminderLine.Description := ReminderCommunication.SubstituteBeginningOrEndingDescription(ReminderAttachmentTextLine.Text, ReminderTotal, MaxStrLen(ReminderLine.Description), LocalReminderHeader, FinChrgTerms);
                ReminderLine.Insert();
            until ReminderAttachmentTextLine.Next() = 0;

            if LineType = Enum::"Reminder Line Type"::"Beginning Text" then
                InsertBlankLine(ReminderLine."Line Type"::"Beginning Text");
        end;
    end;

Requested: Current:

    procedure InsertTextLines(var LocalReminderHeader: Record "Reminder Header"; var ReminderAttachmentText: Record "Reminder Attachment Text"; LineType: Enum "Reminder Line Type"; var NextLineNumber: Integer; LineSpace: Integer)
    var
        ReminderAttachmentTextLine: Record "Reminder Attachment Text Line";
        ReminderCommunication: Codeunit "Reminder Communication";
    begin
        if not ReminderAttachmentText.IsEmpty() then begin

        ....

                ReminderLine.Description := ReminderCommunication.SubstituteBeginningOrEndingDescription(ReminderAttachmentTextLine.Text, ReminderTotal, MaxStrLen(ReminderLine.Description), LocalReminderHeader, FinChrgTerms);
                OnInsertTextLinesOnBeforeRemLineInsert(LocalReminderHeader, ReminderLine, ReminderAttachmentText);
                ReminderLine.Insert();
            until ReminderAttachmentTextLine.Next() = 0;

            if LineType = Enum::"Reminder Line Type"::"Beginning Text" then
                InsertBlankLine(ReminderLine."Line Type"::"Beginning Text");
        end;
    end;


...

    [IntegrationEvent(false, false)]
    local procedure OnInsertTextLinesOnBeforeRemLineInsert(var ReminderHeader: Record "Reminder Header"; var ReminderLine: Record "Reminder Line"; var ReminderAttachmentText: Record "Reminder Attachment Text";)
    begin
    end;

Describe the request

We are requesting this event because our custom solution allows us to use placeholders to fill the Reminder Line Description by subscribing to the old event OnInsertTextLinesOnBeforeReminderLineInsert from the Table "Reminder Header" Internal work item: AB#591743

dorinbirsan avatar Jul 02 '25 10:07 dorinbirsan

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Build ID: 36603.

JesperSchulz avatar Jul 16 '25 15:07 JesperSchulz

Hi Jesper, I think, there was a mistake in the requested event. There should be a ReminderAttachmentTextLine as a parameter in the event, instead of ReminderAttachmentText. Shall I create a new event request issue or this can be changed under this ticket id?

Thanks!

bogdangarkusha avatar Sep 12 '25 14:09 bogdangarkusha

Could you create a follow-up issue? Then we'll revisit your request. Must have been a mistake on our end, I assume. Sorry about that!

JesperSchulz avatar Sep 26 '25 11:09 JesperSchulz

Hello Jesper and Bogdan,

Thanks for the heads-up. I have submitted a new extensibility request: https://github.com/microsoft/ALAppExtensions/issues/29242

Have a nice day ahead!

dorinbirsan avatar Oct 02 '25 08:10 dorinbirsan