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:)
0
Comments
Pargesoft
That's probably going to be expensive :-(
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");
http://www.BiloBeauty.com
http://www.autismspeaks.org
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 & press
http://www.BiloBeauty.com
http://www.autismspeaks.org
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?
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.asp
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.
http://www.BiloBeauty.com
http://www.autismspeaks.org