windows "Run..." function from NAV

Belias
Member Posts: 2,998
hi everyone, actually this is not a tip, but i'm asking for a tip from somone more familiar with these things than me...
in NAV 2009 you can run pages doing start, run,
dynamicsnav:////runpage?page=[page number]
i was wondering if there is a way to run automatically this from a form, passing page number as parameter...is there any automation that can do this?
in NAV 2009 you can run pages doing start, run,
dynamicsnav:////runpage?page=[page number]
i was wondering if there is a way to run automatically this from a form, passing page number as parameter...is there any automation that can do this?
0
Comments
-
Done!
OBJECT Form 50000 Bat Launcher { OBJECT-PROPERTIES { Date=04/12/08; Time=10.24.21; Modified=Yes; Version List=; } PROPERTIES { Width=7260; Height=1760; SaveValues=Yes; OnOpenForm=BEGIN TXTCommand := 'cmd /c start dynamicsnav:////runpage?page='; END; } CONTROLS { { 1101339000;TextBox;3520 ;1210 ;3520 ;440 ;CaptionML=[ENU=Page Number; ITA=Pagina]; SourceExpr=TXTPageNo; OnValidate=BEGIN IF TXTPageNo <> '' THEN BEGIN FLFile.WRITEMODE(TRUE); FLFile.TEXTMODE(TRUE); FLFile.QUERYREPLACE(FALSE); FLFile.CREATE(TXTFilePath); FLFile.WRITE(TXTCommand + TXTPageNo); FLFile.CLOSE; SHELL(TXTFilePath); END; END; } { 1101339001;Label ;110 ;1210 ;3300 ;440 ;ParentControl=1101339000 } { 1101339002;TextBox;3520 ;110 ;3520 ;440 ;CaptionML=[ENU=File Name; ITA=Nome File]; SourceExpr=TXTFilePath } { 1101339003;Label ;110 ;110 ;3300 ;440 ;ParentControl=1101339002 } { 1101339004;TextBox;3520 ;660 ;3520 ;440 ;CaptionML=[ENU=Command Name; ITA=Nome Comando]; SourceExpr=TXTCommand } { 1101339005;Label ;110 ;660 ;3300 ;440 ;ParentControl=1101339004 } } CODE { VAR TXTPageNo@1101339000 : Text[100]; FLFile@1101339001 : File; TXTFilePath@1101339002 : Text[100]; TXTCommand@1101339003 : Text[100]; BEGIN END. } }
Explanation: I create a batch file (name from the first field) and I edit it inserting the code frome the second field + the name of the third field. After that i close the file and I run it with shell.
I don't delete the batch file in order to not have the alert message every time. queryreplace(false) will skip the message "do you want to replace...?"
when i'll have time, i'll refine this (e.g. adding commondialog, allowing pagename as well pageno to be inserted etc.)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