Hi,
I've used the following link to convert my customized objects to al format using https://docs.microsoft.com/en-us/dynamics-nav/developer/devenv-txt2al-tool
I exported .txt files with -ExportToNewSyntax of the Customized and NAV 2018 Objects.
I'm able the get the DELTA files.
When I'm using txt2al the exe runs with no errors but doesn't generate an .al in the target folder.
*This post is locked for comments
Hi Andrey,
Actually you're right but I thought if we could do it via TXT2AL then in that it would be great. Unfortunately it didn't work. But, I try using the Integration Event also, I would try to keep the code close tostandard codeunit. Thanks for the help :)
I looked at your 12 codeunit delta and i think your task is harder than you think :) Because you can't delete code or change function properties from 12 codeunit with extension.
You'll have to refactor a lot of code to stay it as much close to standard as you can. And only add extra code.
Or you should refuse from using extensions for this part of customization and stay it in old way.
Ok, I understood.
I think it's impossible to convert your data to *.al files because AL doesn't have such object as codeunit extension. Standard codeunit can't be converted because it already exists in any database.
So the only way in your case:
1. Look around a place where you insert modification in codeunit and find an integration event. (if it's not found or it's impossible to use event - create your own with C/AL).
2. Create your codeunit in 50000.. range (you can do it directly in vscode or in dev environment and then convert to AL)
3. Create subscriber event function and place your code there. (make subscription on integration event from p.1)
4. Publish your extension (or export your codeunit to txt, convert it to *.al with txt2al and make an app)
So the main idea is :
1. use table extensions to add fields to tables
2. use page extensions to add fields and actions on pages
3. use new codeunits with subscriber event functions to change tables and codeunits logic.
Hey Andrey,
I've tried creating the .bat and tried running it. I got the same results.
Is there any way I can make the .AL of the customized objects?? I.e For Example:
If I've added few lines of code in Codeunit 12 Gen. Jnl.-Post Line. And I want to make .AL to add these customization through the .AL Extension.
Incase for further clarification you can refer to my files from the following link.
Try this:
1. Create new text file with next data:
txt2al --source=D:\Projects\1\Extensions\Source\DELTA --target=D:\Projects\1\Extensions\target --rename --extensionStartID 50100
pause
2. save it to *.bat file
3. Put this file into C:\Program Files (x86)\Microsoft Dynamics NAV\110\RoleTailored Client
4. Run it
Maybe the reason is that txt2al can't convert Delta file. When I tried to do this - i've got an error.
Hi Stefano,
I've already tried the combinations.
Also with removing --rename ?
Hi Stefano,
I've tried that as well but I got the same result.
--target must be a folder path, not a .al file. So the first image I see here is correct. Try adding --extensionStartId to your first image and try adding the double quote to the --target path
Hi Stefano,
I've tried this command as well but I get the same result... No file is created in target path.. Also, I've added multiple delta files to the path as well but I'm not getting any result...
Kindly, suggest something regarding this....
Or a way to customize the standard codeunit through AL.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156