How can I run external Application from Navision

ik
Member Posts: 22
Where can I find example of run external Application from Navision.
I think I should using RunObject -> RunCommand but don't know
format of this string parametr.
Thanx.
I think I should using RunObject -> RunCommand but don't know
format of this string parametr.
Thanx.
0
Comments
-
-
1. use the command shell interface (see C/AL help for usage)
retval := SHELL('anyBatch.bat'); IF retval <> 0 THEN ERROR('Problemn wit Batchfile');
2. Ose an ocx (Here an example with the Navision Pad OCX)Var: OCX_App Type:Automation Subtype: 'Navpad20'.Form OCX_App.EditText := 'Your text line 1'; OCX_App.Pad;
Or use calling the Webinterface with Perl-CGI or PHP in background (I didn't tried yet, but I'm thinking about calling a hyperlink with parameters)0 -
You can open a WinWord-Document within Navision with the SHELL-statement such as ..
SHELL ('C:\Office\WinWord.EXE\Documents\Navision\MyDocument.doc);
But you can achieve the same with the Hyperlink statement:
hyperlink('D:\Documents\Navision\MyDocument.doc');
Of course this works with all registered document types:
hyperlink('MySheet.xls'); --> opens Excel
hyperlink('MyDok.pdf'); --> opens Acrobat
Marcus Fabian
m.fabian@thenet.ch
+41 79 439 78 720 -
I wold not use the hyperlink statement for opening a program.
Reason is that you connect to the document and you open the application which (usually) is linked to the file extension.
Sometimes this works, sometimes not, sometimes an unexpected application is opened. And you can only open the document but not do any modifications.
A much better method is to use the Automation Controller (see many examples here in the forum) for controlling.0 -
Christian Buehl wrote:<snip>
And you can only open the document but not do any modifications.
<snap>0 -
Sorry for this misunderstanding.
What I meant was, that you can't take control by navision what should happen with the document. E.g. to insert any data from the database into Word. The only thing you can do is open the document and do the rest manually.
If you have associated any other application like Wordpad or Staroffice with the .doc extension, this application will open instead of Word. So it's not clear what's happening when you use the hyperlink.
Unlike Unix Windows is not storing the related application in datafiles, applications are identified only by the extension. As I'm not personally a friend of using only Microsoft Products for all and everything I have to consider these arguments. Otherwise MS will have sometimes unlimited control on my Company due to the monopilizing practize MS is showing the last time.0 -
Maybe you can use the Application with the Automation Server. A lot of common Applications (e.g. Word,Outlook etc.) give you the abillity.
Kind Regards0 -
I tried the HYPERLINK-procedure for opening a CSV-file, but alas the users with a Dutch Excel'97 get all output data in one column. I use an English Excel'2000 which works alright.
The SHELL-procedure would require a default installation location for Excel; something I can't be sure about.
I can't try the Automation Server, because I can't choose Automation as a type for Global Variables. Does anyone know if I'm missing some Navision module or something?
edit: meanwhile I found a solution for my problem by using SHELL. I found out that I can just pick the default installation location for all pcs here have Office installed in that directory.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