Bug
Returns the error _var __MissingTypeSymbol___ when an extension is published that calls the virtual table Date through a function
Reproduce
Code:
page 50101 PageDateTest02
{
PageType = List;
ApplicationArea = All;
UsageCategory = Lists;
SourceTable = Date;
var
PeriodFormMgt: Codeunit "PeriodFormManagement";
PeriodType: Option Day,Week,Month,Quarter,Year,"Accounting Period";
trigger OnNextRecord(Steps: Integer): Integer
begin
EXIT(PeriodFormMgt.NextDate(Steps, Rec, PeriodType));
end;
}
Version: 14.0.29532.0 (ES)
Error:
PageDate02.al(14,44): error AL0133: Argument 2: cannot convert from 'Record Date' to var MissingTypeSymbol
It Works in version: 13.5.29614.0 (ES)
Same issue
14.0.29537.29654 (SE)
AL: 3.0.106655
Similar issue below.
AL: 3.0.106655
Version: Platform 14.0.29530.29573 + Application 29654 (W1 14.0)
AllObjWithCaption: Record AllObjWithCaption;
DimensionManagement: Codeunit DimensionManagement;
begin
DimensionManagement.DefaultDimObjectNoList(AllObjWithCaption);
end;
More examples:
AllObjWithCaption and RecordLink
CALTestManagement.AddTestCodeunits(CALTestSuite, AllObjWithCaption);
TypeHelper.WriteRecordLinkNote(RecordLink, Note);
Same in a Matrix Page:
Bug
Virtual Table Record Date in a Matrix Page
Reproduce

Version: 14.0.29530.0 (W1)
Error:
PageDate02.al(14,44): error AL0133: Argument 2: cannot convert from 'Record Date' to var MissingTypeSymbol
AL Package can created! But if you want publish the app to the Server:
error AL0133: Argument 10: cannot convert from 'array[32] of Record Date' to 'var __MissingTypeSymbol__'
Same issue. did anyone find solution?
It's only provisional, but I was using FreddyK鈥檚 New-NavContainer cmdlet from NavContainerHelper and still get this error when using a container created that way and just used the docker run command and no longer get the error.
@freddydk can you please help?
I don't exactly know when using New-NavContainer stopped working, but I'm currently using 0.5.0.11. The last time I know it worked without this publish error was about 2 weeks ago.
New-NavContainer
-containerName navusdaily
-accept_eula
-alwaysPull
-auth NavUserPassword
-doNotExportObjectsToText
-enableSymbolLoading
-imageName mcr.microsoft.com/businesscentral/sandbox:us
-includeCSide
-memoryLimit 8G
-shortcuts Desktop
-licenseFile 'C:WSPM#######.flf'
-updateHosts
docker run
--hostname navusdaily
--name navusdaily
--volume "C:WS:C:WS"
--restart always
-m 8G
-d -e ACCEPT_EULA=Y -e usessl=N -e ClickOnce=Y -e enableSymbolLoading=Y
-e licensefile=C:WSPM#######.flf
-e auth=Nav -e username=* -e password=*
mcr.microsoft.com/businesscentral/sandbox:us
I see that NavContainerHelper was updated to 0.6.0.3, so I tried with that version and still encounter the issue when publishing, and compile works correctly.
error AL0284: The type of the parameter 'TempAllObjWithCaption' on the event subscriber 'OnAfterSetupObjectNoList' does not match the expected type '__MissingTypeSymbol__'.
Same problem here 馃槥
It looks like this might be navcontainerhelper related. If I use navcontainerhelper version 0.5.0.2 instead of 0.5.0.11 my similar issue to this one goes away.
I think I tracked the issue down. if enableSymbolLoading is true the application objects are unpublished.
@BillJay1821 @pmohanakrishna @gudrunleos remove the enableSymbolLoading parameter.
This line of code "causes" the issue:
https://github.com/Microsoft/navcontainerhelper/blob/25cb999af5a4659efbefbd5e20925c121561aa2a/ContainerHandling/New-NavContainer.ps1#L773-L780
Background:
https://github.com/Microsoft/navcontainerhelper/issues/299
If using enableSymbolLoading, you tell the service tier that you will be making changes to the application and as such, the stat铆c symbols are unpublished and the built symbols are used.
It sounds like something might have gone wrong with the symbols that gets build - I will investigate this.
I can definitely reproduce this - and it doesn't help to re-generate the symbols.
It seems like somewhere internally, there is a reference to the "wrong" symbols in 14.x.
I guess the only thing we can do right now is to re-introduce the wrong behavior of keeping the not-used application symbols in the database as they apparently are used internally.
I will publish a new NavContainerHelper which fixes this today and I will discuss with @thpeder and @kalberes what we can do.
"@BillJay1821 @pmohanakrishna @gudrunleos remove the enableSymbolLoading parameter."
@eknraw I can confirm that when I remove the enableSymbolLoading parameter that the container is created successfully and there is no error during publish.
I'll be watching for @freddydk update to NavContainerHelper.
NavContainerHelper 0.6.0.7 has been published with a fix to NOT unload the app symbols.
Remember ONLY use enableSymbolLoading if doing hybrid develoipment.
Hi @freddydk ,
this works... but can only be a temporary workaround... if I want to build a TestApp for my MainApp now.... do I have to take -includeTestToolkit with me.... Then the FOB objects including the test libraries (to create articles etc.) are imported... so that I can use them in the TestApp in AL I have to activate
-enableSymbolLoading again or? (and then cannot publish the MainApp anymore).
Regards
Christian
this hasn't changed - it is only internally that the application symbols is used, see here: https://freddysblog.com/2019/03/16/symbols-demystified/
If you use enableSymbolLoading, you should not have a test reference in app.json (symbols gets built into the invisible app symbols)
If you do not use enableSymbolLoading, you must have a test reference in app.json (symbols are not removed)
maybe I express myself wrongly... Sorry...
Container Created:
New-NavContainer -containerName MYContainer -accept_eula -imageName "mcr.microsoft.com/businesscentral/sandbox:base-ltsc2019"-includecside -Credential $Cred -memoryLimit 4G -auth NavUserPassword -doNotExportObjectsToText -includeTestToolkit -updateHosts -shortcuts StartMenu
MainApp can be published! (Works!)
But if I want to create a TestApp on this container (on the MainApp) I can't access the code unit 130509 "Library - Sales"... (even after a new download). These codeunits (from the Test Framework) are simply not contained in the symbols.... or do I I misunderstood.the process here?
Symbols for platform, app and test are pre-published to the database and if you add "test": "14.0.0.0" to your testapp's app.json you will have the symbols for test toolkit and you can use them.
but... - unless you use includeTestToolkit you do not have the objects - you have the symbols, but not the objects.
-includeTestToolkit causes the objects to be imported and then your test dependency in app.json works.
if you have enableSYmbolLoading, then importing the test toolkit causes the symbols for the test toolkit to be built into the app symbols and if you then have a "test" dependency in app.json, you will have duplicate symbols.
Should all be explained in the blog post.
@Schnieringer - did you make this work?
@freddydk Yes problem seems solved... Thank you