Command Button problem
BBHansen
Member Posts: 8
First of all I have to admit that I have never done any work in Navision before, so therefore my question might sound dumb, sorry.
Ok, I have added a Command Button in a form (Form 21 Customer Card) in the Form Designer.
I have entered exactly the same properties as in the Hyperlink button, but nothing at all happends when I click my button.
Ok ok, I know that I need to write some code somewhere. My big problem is where do I type this code?
So what I want to do is to make a command button exactly as the hyperlink button.
Hopefully someone can help a total newbie as me O:)
Ok, I have added a Command Button in a form (Form 21 Customer Card) in the Form Designer.
I have entered exactly the same properties as in the Hyperlink button, but nothing at all happends when I click my button.
Ok ok, I know that I need to write some code somewhere. My big problem is where do I type this code?
So what I want to do is to make a command button exactly as the hyperlink button.
Hopefully someone can help a total newbie as me O:)
0
Comments
-
If you have access to C/Side you can use OnPush trigger. (Select your button then hit F9 (View,C/Al Code)Ufuk Asci
Pargesoft0 -
Ok, that's the reason why I couldn't find it since I havn't access to that module.
That's probably going to be expensive :-(0 -
here's an example of some code to put on a command button.
I added a command button on the item card that brings me to the manufacturer of that items web site.
*note on the vendor table there is a field called "Home Page" which holds the info ie/ http://www.mibuso.com
OnPush()
Vendor.GET("Vendor No.");
HYPERLINK(Vendor."Home Page");0 -
BBHansen wrote:Ok, that's the reason why I couldn't find it since I havn't access to that module.
That's probably going to be expensive :-(
You can still Hyperlink without getting to the code.
it's not as good ...
View the properties of the command button.
TRY THIS AS AN EXAMPLE
PushAction: RUNSYSTEM
RunCommand: EXPLORER.EXE http://www.MIBUSO.com
Save , Compile & press0 -
Thanks Savatage for your latestest reply with
PushAction: RUNSYSTEM
RunCommand: EXPLORER.EXE http://www.MIBUSO.com
I can see that the code works like a charm, but as you mention it isn't that good as the url is hardcoded.
I'll have to take a look at the price for the module so that I can start learning the Navision programming language
BTW: are there any good books that I can read about programming in Navision?0 -
No problem that the URL www.mibuso.com is hardcoded. This is probably the only URL you ever need ;-)BBHansen wrote:Thanks Savatage for your latestest reply with
PushAction: RUNSYSTEM
RunCommand: EXPLORER.EXE http://www.MIBUSO.com
I can see that the code works like a charm, but as you mention it isn't that good as the url is hardcoded.
[...]
BTW: are there any good books that I can read about programming in Navision?
About the book question: there is a new book coming out this month, specifically about programming in Dynamics NAV. Check out http://www.mibuso.com/bookofferpacktpub.aspNo support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
here's another ROUND_ABOUT way.
Set your command button to Run A ProcessingOnly Report.
PushAction: RunObject
RunObject: Report HyperlinkTest (for example)
Create a report that has the code you want to use.
Ex/ pick any dataitem (that you need to run and/or get code from)
OnPreDataItem()
HYPERLINK('http://www.mibuso.com');
This is going to take some thinking but I'm pretty sure it can be done.
PS if you put the code onAfterGetRecord and use the item table for example. And you have 10000 items. Guess how many tabs your IE is going to try and open
So if you can explain wht type of hyperlinking your looking to do perhaps we can figure out a way.0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
