ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request]Pag 201 - Job Journal

Open frivadulla opened this issue 7 years ago • 2 comments

It would be nice to have an event before doing all the stuff on the OnOpenPage trigger to set up a Batch Name conditionally.

OnOpenPage()
//Begin-EVENT
OnBeforeOpenPage(CurrentJnlBatchName,Rec);
//End-EVENT
IsSaasExcelAddinEnabled := ServerConfigSettingHandler.GetIsSaasExcelAddinEnabled;
IF ClientTypeManagement.GetCurrentClientType = CLIENTTYPE::ODataV4 THEN
  EXIT;

IF IsOpenedFromBatch THEN BEGIN
  CurrentJnlBatchName := "Journal Batch Name";
  JobJnlManagement.OpenJnl(CurrentJnlBatchName,Rec);
  EXIT;
END;

And the event declaration: LOCAL [IntegrationEvent] OnBeforeOpenPage(VAR CurrentBatchName : Code[10];Rec : Record "Job Journal Line")

Thanks in advice!!!

frivadulla avatar Dec 11 '18 13:12 frivadulla

Are you sure this is right place? Maybe better use event in this function JobJnlManagement.OpenJnl(CurrentJnlBatchName,Rec)?

AlexanderYakunin avatar Dec 17 '18 13:12 AlexanderYakunin

Are you sure this is right place? Maybe better use event in this function JobJnlManagement.OpenJnl(CurrentJnlBatchName,Rec)?

I want to set the "CurrentJnlBatchName" variable according to a custom user configuration. The function JobJnlManagement.OpenJnl(CurrentJnlBatchName,Rec) does not have an event either. For my extension i need the event there, to be able to change the variable of the page.

I hope its clear, or if you know another way to achieve this, let me know.

Thanks in advance.

frivadulla avatar Dec 21 '18 12:12 frivadulla