Skip to content

KVSKBAStartupOrderFlowStatistc#

Procedures#

OnRun#

procedure OnRun(Rec: Record "#437dbf0e84ff417a965ded2bb9650972#Sales & Receivables Setup")

Events#

OnRunOnReopenDocuments(Record Sales & Receivables Setup, Dialog) :#

Summary: Integration event raised after reopening released sales documents during order flow statistics initialization.

[IntegrationEvent(false, false)]
local procedure OnRunOnReopenDocuments(var SalesSetup: Record "Sales & Receivables Setup"; var Window: Dialog): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAStartupOrderFlowStatistc", 'OnRunOnReopenDocuments', '', false, false)]
local procedure DoSomethingOnRunOnReopenDocuments(var SalesSetup: Record "Sales & Receivables Setup"; var Window: Dialog)
begin
end;

Parameters:

  • SalesSetup: The Sales & Receivables Setup record being processed.
  • Window: The progress dialog window displayed to the user.

Remarks: This event is raised in the OnRun trigger after the following operations have completed: - All released Sales Orders have been reopened - All released Sales Return Orders have been reopened - KVSKBACreateOrderInflow flag has been set to TRUE

         At this point:
         - Released documents are in Open status
         - Documents have been stored in TempSalesHeader temporary table
         - System is ready to process prepayment documents and re-release orders

         The Window parameter provides access to the progress dialog showing:
         - "Opening released sales orders #1######## #2########"
         - Document Type and Document No. being processed

         Subscribers can use this event to:
         - Extend the reopening process for additional document types
         - Update custom status fields or statistics
         - Log the reopening operation
         - Update the progress dialog with additional information
         - Perform custom validation or business logic after reopening
         - Handle tenant-specific requirements during initialization

         Use cases:
         - Supporting custom document types that need reopening
         - Implementing custom workflow or approval resets
         - Updating external systems about document status changes
         - Adding custom progress tracking or logging
         - Handling KUMAVISION-specific document extensions

         This event fires during the initialization phase before documents are released again.

OnRunOnReleaseDocuments(Record Sales & Receivables Setup, Dialog) :#

Summary: Integration event raised after re-releasing reopened sales documents during order flow statistics initialization.

[IntegrationEvent(false, false)]
local procedure OnRunOnReleaseDocuments(var SalesSetup: Record "Sales & Receivables Setup"; var Window: Dialog): 
[EventSubscriber(ObjectType::Codeunit, Codeunit::"KVSKBAStartupOrderFlowStatistc", 'OnRunOnReleaseDocuments', '', false, false)]
local procedure DoSomethingOnRunOnReleaseDocuments(var SalesSetup: Record "Sales & Receivables Setup"; var Window: Dialog)
begin
end;

Parameters:

  • SalesSetup: The Sales & Receivables Setup record being processed.
  • Window: The progress dialog window displayed to the user.

Remarks: This event is raised at the end of the OnRun trigger after the complete initialization process: - All released Sales Orders have been reopened - All released Sales Return Orders have been reopened - Prepayment status has been updated for pending prepayment orders - Previously released documents have been released again - Order flow statistics are now fully activated and tracking

         At this point:
         - KVSKBACreateOrderInflow flag is set to TRUE
         - All documents are back in their original released status
         - Order flow entries have been created/updated for all documents
         - System is fully operational with order flow statistics enabled

         The Window parameter provides access to the progress dialog showing:
         - "Sales orders will be released again #3######## #4########"
         - Document Type and Document No. being processed

         Subscribers can use this event to:
         - Extend the release process for additional document types
         - Perform final validation after initialization
         - Update custom statistics or reporting tables
         - Log the completion of initialization
         - Update the progress dialog with completion information
         - Trigger workflows or notifications about activation
         - Synchronize with external systems
         - Handle tenant-specific post-initialization tasks

         Use cases:
         - Supporting custom document types that need re-releasing
         - Implementing custom workflow or approval logic
         - Creating audit log entries for activation
         - Sending notifications about system activation
         - Updating custom dashboards or statistics
         - Integrating with external order management systems
         - Performing custom validation after initialization

         This is the final event in the initialization process - the system is fully ready
         for order flow statistics tracking after this event completes.