ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Codeunit 1002 - Job Create-Invoice

Open frivadulla opened this issue 7 years ago • 0 comments

In the function "OpenSalesInvoice", it would be nice to have next event:

Event location


WITH JobPlanningLineInvoice DO
  CASE "Document Type" OF
    "Document Type"::Invoice:
      BEGIN
        SalesHeader.GET(SalesHeader."Document Type"::Invoice,"Document No.");
        PAGE.RUNMODAL(PAGE::"Sales Invoice",SalesHeader);
      END;
    "Document Type"::"Credit Memo":
      BEGIN
        SalesHeader.GET(SalesHeader."Document Type"::"Credit Memo","Document No.");
        PAGE.RUNMODAL(PAGE::"Sales Credit Memo",SalesHeader);
      END;
    "Document Type"::"Posted Invoice":
      BEGIN
        IF NOT SalesInvHeader.GET("Document No.") THEN
          ERROR(Text012,SalesInvHeader.TABLECAPTION,"Document No.");
        PAGE.RUNMODAL(PAGE::"Posted Sales Invoice",SalesInvHeader);
      END;
    "Document Type"::"Posted Credit Memo":
      BEGIN
        IF NOT SalesCrMemoHeader.GET("Document No.") THEN
          ERROR(Text012,SalesCrMemoHeader.TABLECAPTION,"Document No.");
        PAGE.RUNMODAL(PAGE::"Posted Sales Credit Memo",SalesCrMemoHeader);
      END;
  END;

//-- Event
ASM_OnAfter_OpenSalesInvoice(JobPlanningLineInvoice);
//++ Event

Event delcaration: OnAfter_OpenSalesInvoice(VAR pJobPlanningLineInvoice : Record "Job Planning Line Invoice")

Kind regards.

frivadulla avatar Dec 21 '18 13:12 frivadulla