ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] codeunit 5703 "Catalog Item Management" - multiple publishers

Open alapenas opened this issue 3 years ago • 3 comments

Hello, would it be possible to add OnNonStockFSMOnBeforeProgWindowOpen, OnAfterNonStockFSMOnBeforeProgWindowClose event to codeunit 5703 "Catalog Item Management", like this:

    procedure NonStockFSM(var ServInvLine2: Record "Service Line") 
... 
          if NewItem.FindFirst() then
             exit;
 
         IsHandled := false;
>         OnNonStockFSMOnBeforeProgWindowOpen(IsHandled, ServInvLine2); //New Event
         if not IsHandled then begin
             ProgWindow.Open(Text003 +
               Text004 +
               Text005 + 
    procedure NonStockFSM(var ServInvLine2: Record "Service Line") 
... 
          if CheckLicensePermission(DATABASE::"Item Reference") then
             NonstockItemReference(NonStock);
 
         IsHandled := false;
>         OnAfterNonStockFSMOnBeforeProgWindowClose(IsHandled, ServInvLine2); //New Event
         if not IsHandled then
             ProgWindow.Close();
     end;
  
  
     [IntegrationEvent(false, false)]
     local procedure OnNonStockFSMOnBeforeProgWindowOpen(var IsHandled: Boolean; ServInvLine2: Record "Service Line") 
     begin
     end; 
  
     [IntegrationEvent(false, false)]
     local procedure OnAfterNonStockFSMOnBeforeProgWindowClose(var IsHandled: Boolean; ServInvLine2: Record "Service Line") 
     begin
     end; 

alapenas avatar Feb 27 '23 16:02 alapenas

Probably we only need to add GuiAllowed?

AlexanderYakunin avatar Jun 06 '23 15:06 AlexanderYakunin

Hi @AlexanderYakunin, originally we are trying to re-implement the code like this:

if not HideDialog and GuiAllowed then
   ProgWindow.Close();

where HideDialog gets value:

  procedure SetHideDialog(NewHideDialog: Boolean)
  begin
      HideDialog := NewHideDialog;
  end;

if these are added to each ProgWindow.xxx(), no publishers would be needed.

alapenas avatar Jun 07 '23 08:06 alapenas

Availability update: We will publish a fix for this issue in the next update for release 22.

Build ID to track: 57697.

JesperSchulz avatar Jun 14 '23 09:06 JesperSchulz