Event not found in the target (...) when publishing an Extension
- 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!
Which Build is the Customer Server using? And based on which Build have you created your extension?
Customer Build: 11.0.24232.0 Extension Build: 11.0.23572.0
When publishing again in the evening, the problem didn't occur again. I am closing ticket then.