-
Notifications
You must be signed in to change notification settings - Fork 687
Description
Why do you need this change?
-
Consistency: The IsCreditDocType procedure already contains the OnAfterIsCreditDocType event, therefore IsInvoiceDocType should have an analogous event
-
Extensibility: This will allow extension applications to modify the logic for determining if a document is an invoice type
-
Symmetry: Both procedures serve a similar purpose (document type determination) and should have the same structure to ensure consistent API design
Benefits for Partners and Customers:
Extension applications will be able to influence the document type determination logic according to their specific needs, just as it's possible with IsCreditDocType.
This proposal ensures consistent behavior and extensibility for both functions, which is important for maintaining a clean and predictable API in the Base App.
Describe the request
Current Implementation:
procedure IsInvoiceDocType(): Boolean
begin
exit("Document Type" in ["Document Type"::Order, "Document Type"::Invoice]);
end;
Proposed Change:
procedure IsInvoiceDocType() Result: Boolean
begin
Result := "Document Type" in ["Document Type"::Order, "Document Type"::Invoice];
OnAfterIsInvoiceDocType(Rec, Result);
end;
New Integration Event to Add:
[IntegrationEvent(false, false)]
local procedure OnAfterIsInvoiceDocType(PurchaseLine: Record "Purchase Line"; var Result: Boolean)
begin
end;
Internal work item: AB#613476