Executes external programs and operating system commands from Dynamics Busniess central (SHELL)

FirasFiras Member Posts: 25
Hello

Dos anybody know i can i emplemt SHELL in extention 02 programming?

Regs.
Firas
Firas

Ms. dynamics NAV / Dynamics 365 Business Central Development Consultant

Comments

  • FirasFiras Member Posts: 25
    /
    Firas

    Ms. dynamics NAV / Dynamics 365 Business Central Development Consultant
  • Jan_VeenendaalJan_Veenendaal Member Posts: 206
    You can't.
    Why do you want to use it?
    Jan Veenendaal
  • FirasFiras Member Posts: 25
    Hi Jan
    i want to send a labe file to Citizen CLP label printer

    IF FILE.EXISTS(PrintFilname) AND FILE.EXISTS(BatchFileName) THEN BEGIN
    SHELL(BatchFileName);
    IF PDAOps‘t."delete-temp-fil" THEN BEGIN
    SLEEP(2000);
    ERASE(PrintFilname);
    ERASE(BatchFileName);
    END;
    END;
    Firas

    Ms. dynamics NAV / Dynamics 365 Business Central Development Consultant
  • Jan_VeenendaalJan_Veenendaal Member Posts: 206
    SHELL doesn't exist as a command anymore; and file handling in AL is only possible in OnPrem situations.

    The best way to solve this is by calling an external application throug (e.g.) web services.
    Jan Veenendaal
  • SanderDkSanderDk Member Posts: 497
    @Jan_Veenendaal is rigth, you cannot use shell or directly work with the file system of a Extension.

    But if you only are working with an onprem installation you can set your Target in your app.json to internal and there but you can work with both your file system and .NET, with .NET you can call a process (instead of shell)
    If your are working with cloud you can handle this a couple of ways, you could use a Azure service bus to work with your file system or you can set up a directory to save your files from BC and set up a windows task schedule to handle file from that folder and sent to to a printer.

    For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.
  • FirasFiras Member Posts: 25
    Thnk you so much for your tips, i have already made a .NET call a process function .

    Is it possable to use RDLC layout to solve this challange?

    @SanderDk @Jan_Veenendaal
    Firas

    Ms. dynamics NAV / Dynamics 365 Business Central Development Consultant
  • SanderDkSanderDk Member Posts: 497
    Firas wrote: »
    Is it possable to use RDLC layout to solve this challange?

    Not to my knowledge
    For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.
  • FirasFiras Member Posts: 25
    @SanderDk thank you
    Firas

    Ms. dynamics NAV / Dynamics 365 Business Central Development Consultant
Sign In or Register to comment.