ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

Handler to suppress message text in codeunit 5624 "Cancel FA Ledger Entries" function TransferLine()

Open shadow747 opened this issue 5 years ago • 1 comments

Function TransferLine() in codeunit 5624 "Cancel FA Ledger Entries" has Message(Text003) in last line of function that should should have GUI allowed or hide validation logic to suppress the message if not required in automated process.

procedure TransferLine(var FALedgEntry: Record "FA Ledger Entry"; BalAccount: Boolean; NewPostingDate: Date) var IsHandled: Boolean; begin ClearAll; with FALedgEntry do begin if Find('+') then repeat if DeprBookCode = '' then DeprBookCode := "Depreciation Book Code"; if DeprBookCode <> "Depreciation Book Code" then FieldError("Depreciation Book Code", Text001); if "FA No." = '' then Error(Text002, FieldCaption("Entry No."), "Entry No."); FA.Get("FA No."); DeprBook.Get("Depreciation Book Code"); DeprBook.IndexGLIntegration(GLIntegration); CheckType(FALedgEntry); if NewPostingDate > 0D then begin "Posting Date" := NewPostingDate; DeprBook.TestField("Use Same FA+G/L Posting Dates", false); end; IsHandled := false; OnTransferLineOnBeforeInsertJnlLine(FALedgEntry, BalAccount, FA."Budgeted Asset", IsHandled); if not IsHandled then if GLIntegration[ConvertPostingType + 1] and not FA."Budgeted Asset" then InsertGenJnlLine(FALedgEntry, BalAccount) else InsertFAJnlLine(FALedgEntry); until Next(-1) = 0; end; IF NOT GetHideValidationDialog AND GUIALLOWED THEN // New code line Message(Text003); end;

Version - BC17.3

shadow747 avatar Feb 05 '21 11:02 shadow747

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. We will update this issue with information about availability. 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.

JesperSchulz avatar Feb 09 '21 12:02 JesperSchulz