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

FirasFiras Posts: 8Member
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 Posts: 8Member
    /
    Firas

    Ms. dynamics NAV / Dynamics 365 Business Central Development Consultant
  • Jan_VeenendaalJan_Veenendaal Posts: 206Member
    You can't.
    Why do you want to use it?
    Jan Veenendaal
  • FirasFiras Posts: 8Member
    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 Posts: 206Member
    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 Posts: 333Member
    @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, but use forum instead, perhaps other people have the same question, or better answers.
  • FirasFiras Posts: 8Member
    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 Posts: 333Member
    Firas wrote: »
    Is it possable to use RDLC layout to solve this challange?

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

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