Issue Codeunit 5403 AddOnIntegrManagement - OnBeforeCheckReceiptOrderStatus
We subscribe to the event OnBeforeCheckReceiptOrderStatus in Codeunit 5403 AddOnIntegrManagement with parameter checked = true. The code compiles and is published without any problem but at runtime we get an error when we check the Event - Subscriptions (ErrorParameterMismatch).
The event request information: https://github.com/microsoft/AL/issues/1117
Screenshot Event - Subscriptions Error Message
Standard code
[External] CheckReceiptOrderStatus(VAR SalesLine : Record "Sales Line")
OnBeforeCheckReceiptOrderStatus(SalesLine,Checked);
IF Checked THEN
EXIT;
IF SalesLine."Document Type" <> SalesLine."Document Type"::Order THEN
EXIT;
IF SalesLine.Type <> SalesLine.Type::Item THEN
EXIT;
CheckReceiptOrderStatus.SalesLineCheck(SalesLine);
LOCAL [IntegrationEvent] OnBeforeCheckReceiptOrderStatus(SalesLine : Record "Sales Line";VAR Checked : Boolean)
Extension code
codeunit 70000000 "AddOnIntegrMgtSubscr13SFX"
{
EventSubscriberInstance = StaticAutomatic;
[EventSubscriber(ObjectType::Codeunit, Codeunit::AddOnIntegrManagement,'OnBeforeCheckReceiptOrderStatus','', true, true)]
local procedure CheckPlannedProdOrderStatusOnBeforeCheckReceiptOrderStatus(SalesLine: Record "Sales Line"; var Checked: Boolean);
var
CheckProdOrderStatus: Codeunit CheckProdOrderStatusSFX;
CheckPlannedProdOrderStatus: Page CheckPlannedProdOrderStatusSFX;
begin
if Checked then
exit;
if SalesLine."Document Type" <> SalesLine."Document Type"::Order then
exit;
if SalesLine.Type <> SalesLine.Type::Item then
exit;
if not CheckPlannedProdOrderStatus.SalesLineShowWarning(SalesLine) then
exit;
CheckProdOrderStatus.SalesLineCheck(SalesLine);
Checked := true;
end;
}
Versions: AL Language: 3.0.106655 Business Central: Platform 14.0.31606.0 Application 31632 (W1 14.1)
Hi,
Could you confirm that you are using the latest symbols? You can refer to the following page for more information:
https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-running-cside-and-al-side-by-side
If you still have problems, let us know and we will investigate further.
Thanks, Thaddeus
Hi,
We've downloaded the symbols from the specific environment (on basis of docker image = bcinsider.azurecr.io/bcsandbox-master:14.1.31632.0-base-ltsc2019). The Integration Event is available and the code is compiled and published without any problem to this environment.
At runtime we get the error about 'ParameterMismatch'.
Best regards, Huub.
Hi! In the last months, we've been working hard on adding new features that increase your productivity and on improving the quality of the tools. Unfortunately, this meant that we were not able to follow up on as many GitHub issues as we would have liked. Is this issue still a problem for you? Does it reproduce on the Wave 2 2019 release? Can you provide a sample project to reproduce the issue?
This issue has been closed because it needs more information and has not had recent activity. Please open a new issue if you believe this has not been resolved and reference the current issue.