AL icon indicating copy to clipboard operation
AL copied to clipboard

TextType = BigText doesn't work correctly in XmlPort

Open Joerio opened this issue 9 years ago • 0 comments

When you set the TextType to BigText everything works as expected in the AL editor, and you can use intellisense for your BigText variable. However, if you try to publish the package it gives a bunch of errors because it suddenly sees the BigText variable as a normal Text variable, and so doesn't recognize the BigText functions.

          textelement(Save_Data_Value)
          {
            TextType = BigText;            
            MinOccurs=Once;
            MaxOccurs=Once;

            trigger OnAfterAssignVariable();
            var
              OStream : OutStream;
            begin             
              SchemaFields.Values.CREATEOUTSTREAM(OStream);
              Save_Data_Value.Write(OStream);
              SchemaFields.length := Save_Data_Value.Length();
              clear(Save_Data_Value);
            end;
          }

When this code is set, Visual Studio Code throws the following errors while publishing:

[2017-09-21 16:00:49.50] The request for path /NAV/dev/apps failed with code InternalServerError. Reason: c:\ProgramData\Microsoft\Microsoft Dynamics NAV\110\Server\MicrosoftDynamicsNavServer$NAV\source\XMLport\Group48f350eb3da561fa4b2a70a3373974c6_XMLport50146.cs(539,17) : error CS0012: The type 'Microsoft.Azure.ActiveDirectory.GraphClient.Extensions.IEntityBase' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Azure.ActiveDirectory.GraphClient, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. c:\ProgramData\Microsoft\Microsoft Dynamics NAV\110\Server\MicrosoftDynamicsNavServer$NAV\source\XMLport\Group48f350eb3da561fa4b2a70a3373974c6_XMLport50146.cs(539,52) : error CS1061: 'Microsoft.Dynamics.Nav.Runtime.NavText' does not contain a definition for 'ALWrite' and no extension method 'ALWrite' accepting a first argument of type 'Microsoft.Dynamics.Nav.Runtime.NavText' could be found (are you missing a using directive or an assembly reference?) c:\ProgramData\Microsoft\Microsoft Dynamics NAV\110\Server\MicrosoftDynamicsNavServer$NAV\source\XMLport\Group48f350eb3da561fa4b2a70a3373974c6_XMLport50146.cs(541,145) : error CS1061: 'Microsoft.Dynamics.Nav.Runtime.NavText' does not contain a definition for 'ALLength' and no extension method 'ALLength' accepting a first argument of type 'Microsoft.Dynamics.Nav.Runtime.NavText' could be found (are you missing a using directive or an assembly reference?) c:\ProgramData\Microsoft\Microsoft Dynamics NAV\110\Server\MicrosoftDynamicsNavServer$NAV\source\XMLport\Group48f350eb3da561fa4b2a70a3373974c6_XMLport50146.cs(543,54) : error CS0029: Cannot implicitly convert type 'Microsoft.Dynamics.Nav.Runtime.NavBigText' to 'Microsoft.Dynamics.Nav.Runtime.NavText'

Joerio avatar Sep 21 '17 14:09 Joerio