ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] Codeunit 1002 - Job Create-Invoice
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.