Hybrid Environment and its challenges

  2 minute read

In the earlier versions of BC i.e. till BC14 or in the last version of NAV i.e. NAV 2018 we have the option to develop in C/AL and also develop extensions using AL. But there are some challenges with this type of implementation, especially with NAV 2018.

I am working on an implementation where we are using this type of environment and below are some of the challenges and the errors we commonly encountered during our build process or deployment or development.

Events


The number of events available in NAV 2018 is very less, there are around 1300 events in NAV 2018 CU8 compare to the events available in BC17. Based on the customization we often have to update C/AL to add the new events which are added in the new version and then subscribe to those into our extension, if we fail to upload that C/AL or generate symbols for that C/AL object then we will run into an issue saying the event is missing or not found an error. So keeping both C/AL and AL in sync is very important.

Symbols Generation


When you have your changes in C/AL you need to make sure all those objects are loaded in your container and your build script has the action to upload those objects to generate symbols. There are several errors I have encountered in my build script the only way I was successful building it was to restart the container after every action, i.e, after importing objects, after generating symbols. We ran few other issues where the symbols were not being generated properly after the build and the only solution that worked for me is to compile and generate symbols for all the objects, instead of doing it only for the modified objects. The build process itself takes a little longer because of uploading the C/AL objects and generate symbols and in our case, most of ISV’s are in CAL, so the file size is big to upload.

Deployment/Build Errors


One of the common error we received while deploying the extension is

server “DynamicsNAV110” is unable to process the request. The application will close.

I tried to restart the services but usually, that does not help, so we need to compile all the objects from the development environment and make sure the shortcut you are using for Dev Environment as *generatesymbolreference=yes** in the Target field. or you can use the PowerShell Script for this. One important setting is “Enable loading application symbols at server startup” on the Administration Tool.

You can find more information in the below link

Running C/SIDE and AL Side-by-Side

Deploy Error

The other error I received is “table XXXX is missing”, this is also because of the symbols error, if anybody made the changes to the C/Al directly on that server and if you have not synchronized or updated your repo then you will run into this issue, you need to run the same above command.

Accessing Fields/Procedures


Unfortunately, anything developed an extension cannot be accessed in C/Al, whether that is a field or procedure. But we have several ISV’s who are doing some customization and need access to some tables and their data which we developed in AL, so we have created publisher codeunit and called those procedures during trigger events to pass the information. If we need to access any data in C/AL which we have added in AL then we can use the RecordRef and FieldRef, but you cannot access the procedures or codeunits which are in AL.

RecRef.OPEN(50000);
FldRef := RecRef.FIELD(1)

Thank you for following me. :pray:

Leave a comment