SHELL Command

bekio
Member Posts: 204
Does SHELL Command works in NAS, because i have made one Codeunit and it gives me warning when i compile this codeunit. I want this codeunit to be executed with job queue.
but in CSIDE help it says:
The SHELL function can only be used with a text constant on Microsoft Dynamics NAV Application Server.
The SHELL function is not supported in the RoleTailored client.
I need HELP in solving this problem.
but in CSIDE help it says:
The SHELL function can only be used with a text constant on Microsoft Dynamics NAV Application Server.
The SHELL function is not supported in the RoleTailored client.
I need HELP in solving this problem.
0
Answers
-
-
IN clasic is ok but in NAS i didn't tried it.
Because i get the same warning like wen i was working with dataports.
http://www.mibuso.com/forum/viewtopic.php?f=23&t=446570 -
How does your SHELL Code looks like? Their can be some trouble using parameters.0
-
I just want to extract files and archive with winrar.
I have created a batch file to exctract files from one shared folder to location to temp folder, and than import this text files in NAV. And i want to execute this text file from Navision, and i have used Shell Command.
If you have better idea, even not using shell pleas tell me.
Thanks pduck,0 -
pduck wrote:How does your SHELL Code looks like? Their can be some trouble using parameters.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
-
SHELL('C:\Extract.bat');
Then this batch has inside code to extract data and put to another folder.0 -
bekio wrote:SHELL('C:\Extract.bat');
That is not a text constant... a Text Constant is what you define in View - C/AL Globals (or locals) - Text Constants tab0 -
Please read the help file for SHELL. Everything is explained there. You need to define a constant containing your Batch-Comand and pass this to the SHELL comand.
TEXT001 = C:\Extract.bat <- define this as a constant
Your Code:
SHELL(TEXT001);0 -
I have done this, and Job Queue executes good, but the Shell command that executes batch file does not work, and also does not give me any warning in Event viewer.
Any idea? :roll:0 -
bekio wrote:Any idea? :roll:No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
-
Attached you have what i have used to execute.
And also, when i want something to change in codeunit, to add som additional part of code to be executed, it dosn't exectute that part of codeunit. Is stored as a file somewhere out this Job Queue.
For Example i have comentet some lines and save codeunit, and it stills executes those lines, so i need to create another job queue with last changes of codeunit to be executet without those lines.
Thanks Luc,0 -
OK is with SHELL but is not ok with this questions.bekio wrote:And also, when i want something to change in codeunit, to add som additional part of code to be executed, it dosn't exectute that part of codeunit. Is stored as a file somewhere out this Job Queue.
For Example i have comentet some lines and save codeunit, and it stills executes those lines, so i need to create another job queue with last changes of codeunit to be executet without those lines.0 -
bekio wrote:Attached you have what i have used to execute.
And also, when i want something to change in codeunit, to add som additional part of code to be executed, it dosn't exectute that part of codeunit. Is stored as a file somewhere out this Job Queue.
For Example i have comentet some lines and save codeunit, and it stills executes those lines, so i need to create another job queue with last changes of codeunit to be executet without those lines.
Thanks Luc,
It means, that you need to restart the NAS executing the job queue... source of your problem is object cache...0 -
So if i extend object cache does it means that without restarting NAS it is going to get the latest changes of codeunit.
Thanks kine0 -
No, it will not help, theoretically it will be worse (the objects will be in the cache longer time...). It is standard that you need to restart NAS when you change objectes in the application. It is same like with other clients connected to the database...0
-
Thanks for information Kine, it was very helpful for me!
:idea:0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions