AL icon indicating copy to clipboard operation
AL copied to clipboard

Event not found in the target (...) when publishing an Extension

Open MatDDev opened this issue 8 years ago • 3 comments

  • AL Extension Version: 2.0.48254

I am having a problem when trying to publish an extension at the customer server with the following error:

Publishing C:\XX\Extensions\XXXXXXX_1.0.0.0.app ... Publish-NAVApp : Extension compilation failed Cod/Cod50000-%20Receipt%20Statistics%20Mgt.al(6,69): error AL0280: **The event 'OnBeforeItemJnlPostLine' is not found in the target** At line:4 char:5 Publish-NAVApp -ServerInstance $ServerInstance -Path $_ -SkipVerification + CategoryInfo : InvalidArgument: (Microsoft.Dynam...s.PublishNavApp:PublishNavApp) [Publish-NAVApp], InvalidOperationException + FullyQualifiedErrorId : Microsoft.Dynamics.Nav.Apps.Management.Cmdlets.PublishNavApp

The code in this Codeunit looks like this:

`codeunit 50000 "Receipt Statistics Mgt." {

EventSubscriberInstance = StaticAutomatic;

[EventSubscriber(ObjectType::Codeunit, Codeunit::"Purch.-Post", 'OnBeforeItemJnlPostLine', '', true, true)]
local procedure RunOnBeforeItemJnlPostLine(var ItemJournalLine: Record "Item Journal Line"; PurchaseLine: Record "Purchase Line"; PurchaseHeader: Record "Purchase Header")
begin
    ItemJournalLine."Expected Receipt Date" := PurchaseLine."Expected Receipt Date";
end;`

Any idea what this is about? Thanks!

MatDDev avatar Oct 04 '18 12:10 MatDDev

Which Build is the Customer Server using? And based on which Build have you created your extension?

dNsl9r avatar Oct 04 '18 14:10 dNsl9r

Customer Build: 11.0.24232.0 Extension Build: 11.0.23572.0

MatDDev avatar Oct 04 '18 14:10 MatDDev

When publishing again in the evening, the problem didn't occur again. I am closing ticket then.

MatDDev avatar Oct 05 '18 06:10 MatDDev