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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Business Central forum

Txt2al conversion - Problem with DotNet in Business Central Onprem

(0) ShareShare
ReportReport
Posted on by 2,245

Hello everyone!

I finally decided to take the step forward and convert a technical tool I developed a while ago on NAV to Business Central (AL) using the txt2al tool provided by Microsoft.

Despite running into over 1200 errors in VSCode which I've already solved, I am happily surprised by how it works, but I ran with one specific issue I can't figure out.

I have the following code (find attached image):

0317.Captura.PNG

You can see the "Path" DotNet variable, and right below it how it's called.

Of course the Path Dotnet is defined in the DotNet.al file as well (find attached image):

Captura2.PNG

When I run this code in the RTC Client, I get the following message (find attached image):

Captura3.PNG

I would appreciate any suggestions very much :-)

Cheers friends!

Categories:
  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    Can you try to use Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) ?

  • jcastro Profile Picture
    2,245 on at

    Hello Stefano, thanks for your input!

    I tried what you suggested and I got the same error (find attached image):

    7382.Captura.PNG

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi José.

    Well, I have the same remark as Stefano but from what I see on your last attached image you didn't try what Stefano suggested you to use.

    try this :

    BasePath := Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);


    instead of what you are using (in the attached image):

    BasePath := Environment.GetFolderPath(SpecialFolder.ProgramFiles);

    --

    Please verify my answer if you find my answer helpful. Doing so you'll show other community members that there was found a solution and you credit my help.

    -------------

    Best Regards,

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans