ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Codeunit 1101 - CA Jnl.-Check Line - RunCheck

Open almatlansag opened this issue 6 years ago • 4 comments

Could you please create an Integration event in Codeunit 1101 - CA Jnl.-Check Line, in function RunCheck?

[External] RunCheck(VAR CostJnlLine : Record "Cost Journal Line")
WITH CostJnlLine DO BEGIN
....
  // >>>>
  IsHandled := FALSE;
  OnRunCheckOnBeforeDateNotAllowed(CostJnlLine,IsHandled);
  IF NOT IsHandled THEN
  // <<<<
    IF GenJnlCheckLine.DateNotAllowed("Posting Date") THEN
      FIELDERROR("Posting Date",Text005);
....
END;

Event signature:

LOCAL [IntegrationEvent] OnRunCheckOnBeforeDateNotAllowed(VAR CostJnlLine : Record "Cost Journal Line";VAR IsHandled : Boolean)

We need this in our product to set the allowed posting date specifically for Cost Accounting.

almatlansag avatar Dec 09 '19 13:12 almatlansag

We already have this possibility here procedure DateNotAllowed(PostingDate: Date): Boolean var SetupRecordID: RecordID; begin exit(IsDateNotAllowed(PostingDate, SetupRecordID)); end;

procedure IsDateNotAllowed(PostingDate: Date; var SetupRecordID: RecordID) DateIsNotAllowed: Boolean
var
    UserSetupManagement: Codeunit "User Setup Management";
begin
    DateIsNotAllowed := not UserSetupManagement.IsPostingDateValidWithSetup(PostingDate, SetupRecordID);
    OnAfterDateNoAllowed(PostingDate, DateIsNotAllowed);
    exit(DateIsNotAllowed);
end;

AlexanderYakunin avatar Dec 17 '19 13:12 AlexanderYakunin

In that existing event we cannot tell which journal is being posted (General or Cost Journal). We would like to set the allowed posting date specifically for Cost Accounting. Could you please check again? Thank you!

almatlansag avatar Dec 17 '19 15:12 almatlansag

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.

bc-ghost avatar Dec 24 '19 08:12 bc-ghost

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.

bc-ghost avatar Dec 27 '19 10:12 bc-ghost