ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] codeunit 1800 "Assisted Company Setup" - multiple publishers

Open alapenas opened this issue 3 years ago • 2 comments

Hello, would it be possible to add OnScheduleConfigPackageImportOnBeforeStartSession event to codeunit 1800 "Assisted Company Setup", like this:

    procedure ScheduleConfigPackageImport(ConfigurationPackageFile: Record "Configuration Package File"; Name: Text) 
... 
                  Commit();
                 "Task ID" := CreateGuid();
                 ImportSessionID := 0;
                 IsHandled := false;
>                 OnScheduleConfigPackageImportOnBeforeStartSession(IsHandled);//New Event  
                 if not IsHandled then
                     StartSession(ImportSessionID, CODEUNIT::"Import Config. Package File", "Company Name", ConfigurationPackageFile);
             end;
             "Company Setup Session ID" := ImportSessionID; 
  
     [IntegrationEvent(false, false)]
     local procedure OnScheduleConfigPackageImportOnBeforeStartSession(var IsHandled: Boolean) 
     begin
     end; 

alapenas avatar Feb 27 '23 16:02 alapenas

Hello @alapenas Could you use existing OnBeforeScheduleTask(DoNotScheduleTask, TaskID, ImportSessionID); where with DoNotScheduleTask = true, system will not call StartSession?

AleksandricMarko avatar Jun 16 '23 14:06 AleksandricMarko

Hi @AleksandricMarko Thanks for the suggestion.

alapenas avatar Jun 19 '23 06:06 alapenas