ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] codeunit 90 "Purch.-Post" - OnContinuousPreview

Open gretanorv opened this issue 3 years ago • 3 comments

Hello, would it be possible to add OnContinuousPreview, event to codeunit 90 "Purch.-Post", like this:

    local procedure FinalizePosting(var PurchHeader: Record "Purchase Header"; var TempDropShptPostBuffer: Record "Drop Shpt. Post. Buffer" temporary; EverythingInvoiced: Boolean) 
... 
          if PreviewMode then begin
             if not HideProgressWindow then
                 Window.Close();
             IsHandled := false;
>             OnContinuousPreview(PurchHeader, IsHandled); //New Event   
             if IsHandled then
                 exit;
             GenJnlPostPreview.ThrowError();
         end; 
  
     [IntegrationEvent(false, false)]
     local procedure OnContinuousPreview(var PurchHeader: Record "Purchase Header"; var IsHandled: Boolean)
     begin
     end; 

gretanorv avatar Apr 05 '23 10:04 gretanorv

Please explain the purpose of this event? What is ContinousPreview?

AlexanderYakunin avatar Apr 25 '23 10:04 AlexanderYakunin

You are right, this is misleading. ContinousPreview is the name of custom boolean which check is performed in the subscriber. The purpose is to exit the procedure after posting is finalized.

gretanorv avatar May 31 '23 07:05 gretanorv

We cannot add this event, as this is potentially data loss. If you run preview mode, you must raise this error, you cannot skip it programmatically.

AlexanderYakunin avatar Jun 06 '23 12:06 AlexanderYakunin