web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Converting customized objects to .al files using txt2al converter toolk

(0) ShareShare
ReportReport
Posted on by 3,967

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.

4201.Capture.JPG

*This post is locked for comments

I have the same question (0)
  • Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    So strange... try adding/removing " from the source/target path (here I see that you use " only on --source path and not on --target) and try addind the extension's startind ID (--extensionStartID <yourExtensionsID>).

  • Olister Rumao Profile Picture
    3,967 on at

    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...2451.Capture.JPG

    Kindly, suggest something regarding this....
    Or a way to customize the standard codeunit through AL.

  • Olister Rumao Profile Picture
    3,967 on at

    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...6607.Capture.JPG

    Kindly, suggest something regarding this....
    Or a way to customize the standard codeunit through AL.

  • Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    --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

  • Olister Rumao Profile Picture
    3,967 on at

    Hi Stefano,

    I've tried that as well but I got the same result.

  • Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    Also with removing --rename ?

  • Olister Rumao Profile Picture
    3,967 on at

    Hi Stefano,

    I've already tried the combinations.

  • Suggested answer
    Andrey Baludin Profile Picture
    3,941 on at

    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.

  • Olister Rumao Profile Picture
    3,967 on at

    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.

    drive.google.com/open

  • Verified answer
    Andrey Baludin Profile Picture
    3,941 on at

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans