ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[EventRequest] Codeunit 5980 - Service-Post - OnAfterPostServiceDoc - missing parameters

Open MatjazSega opened this issue 5 years ago • 3 comments

Hello,

We are doing some post-posting data manipulation when service documents are posted. We encountered a problem of not being able to comply with "SuppressCommit" and other conditions because OnAfterPostServiceDoc event in Service-Post codeunit is missing paramaters:

OnAfterPostServiceDoc(var ServiceHeader: Record "Service Header"; ServShipmentNo: Code[20]; ServInvoiceNo: Code[20]; ServCrMemoNo: Code[20])

Please, add relevant missing parameters like they are available at sales posting:

local procedure OnAfterPostSalesDoc(var SalesHeader: Record "Sales Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; SalesShptHdrNo: Code[20]; RetRcpHdrNo: Code[20]; SalesInvHdrNo: Code[20]; SalesCrMemoHdrNo: Code[20]; CommitIsSuppressed: Boolean; InvtPickPutaway: Boolean; var CustLedgerEntry: Record "Cust. Ledger Entry"; WhseShip: Boolean; WhseReceiv: Boolean)

Thank you in advance!

BR, Matjaž

MatjazSega avatar Aug 30 '21 08:08 MatjazSega

Please list which extra parameters you need in this event. "relevant missing parameters" is not exactly telling much, because sales and service side do differ a bit...

Stepanenko-Vadim avatar Sep 01 '21 10:09 Stepanenko-Vadim

I need "CommitIsSuppressed" parameter specifically for my purposes, but I can imagine scenario where all new parameters listed below are useful (I have had need for these parameters in past when extending posting procedure).

[IntegrationEvent(false, false)] local procedure OnAfterPostServiceDoc(var ServiceHeader: Record "Service Header"; ServShipmentNo: Code[20]; ServInvoiceNo: Code[20]; ServCrMemoNo: Code[20]; var ServDocumentsMgt: Codeunit "Serv-Documents Mgt."; CommitIsSuppressed: Boolean; PassedShip: Boolean; PassedConsume: Boolean; PassedInvoice: Boolean; WhseShip: Boolean) begin end;

MatjazSega avatar Sep 01 '21 10:09 MatjazSega

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

JesperSchulz avatar Sep 02 '21 13:09 JesperSchulz