[29.x]-"The record in table Reminder Line already exists." error appears if you Create Reminders for a Customer with all the Open Entries On Hold and no Reminder Free applied on the Reminder Terms used. - #11209
Conversation
Good Sense Reviewer - Round 1Recommendation: Accept with SuggestionsWhat this PR doesThe change updates ending-text line numbering when a reminder has no reminder, additional-fee, or rounding lines. It now starts ending text after existing beginning text instead of from line 0, so InsertBlankLine and InsertTextLines do not reuse the first beginning-text line number. The branch is targeted. The normal path is unchanged when chargeable reminder lines, an additional fee, or rounding lines exist. In the reported zero-fee and all-on-hold flow, on-hold lines are added after InsertLines, so using the last beginning-text line as the fallback anchor addresses the duplicate key error without changing the later on-hold insertion. Problem-solution fitFit: Strong The bug describes reminder creation with all entries on hold, beginning and ending texts, and a zero reminder fee. The diff changes the exact empty chargeable-line branch that could otherwise reuse line number 10000, while keeping the existing line-spacing logic for other reminder layouts. SuggestionsS1 (🟠 Moderate): Add the no-fee text regression test Risk assessment and necessityRisk: The regression surface is limited to reminder text layout in ReminderCommunication.Codeunit.al and ReminderHeader.InsertTextLines. If this branch is wrong, reminder creation can still fail with duplicate line numbers or place ending text in the wrong position. No public API or event signature changes. Necessity: The change is needed because the zero-fee and all-on-hold path can block reminder creation before the on-hold lines are added. The scope is small and matches the line-numbering gap; adding the regression test would make it safer.
|
Fixes AB#649376
Workitem: Bug 649376: [29.X]-[All-e]"The record in table Reminder Line already exists." error appears if you Create Reminders for a Customer with all the Open Entries On Hold and no Reminder Free applied on the Reminder Terms used.