How to: Programmatically Create a Navision Menu Item?

bramantebramante Member Posts: 11
edited 2005-11-29 in Navision Attain
My ultimate goal is for a Navision user to be able to run an executable 'A.exe' that will, amongst many other things, create a Navision menu item under the 'File' menu that will launch another executable 'B.exe'.

How can I programmatically create such a Navision menu item? My programming language of choice is C#. And I must develope this using VisualStudio.NET.

Please be specific in your reply as I am a beginner with Navision.

Thank you in advance for your support.

Comments

  • roshandilrukroshandilruk Member Posts: 51
    Hi,

    I m not getting exactly what u r trying to say, by the way if you want to call navision from some where outside you can use SHELL commad, with most of the languages it's available.

    Let me know this in detail.

    Roshan
  • DenSterDenSter Member Posts: 8,307
    Please don't crosspost. Thanks.
  • bramantebramante Member Posts: 11
    How and in what way do you suggest I use the 'SHELL' command.

    Please be specific in your reply as I am a beginner with Navision.
  • awarnawarn Member Posts: 261
    Open the Navision help and search for SHELL.

    From the help:

    Example
    Here is an example of how you can use the SHELL function:

    SHELL('c:\joe\myprog.exe', 'arg1', 'arg2');

    This statement executes a program named myprog.exe in the directory c:\joe. There are two arguments, arg1 and arg2, which are passed to the function. To call the DOS command DIR, you would use this code:

    CommandProcessor := 'c:\command.com';
    Argument := '/c';
    DOSCommand := 'dir';
    SHELL(CommandProcessor, Argument, DOSCommand);


    So that answers how to run an external application, but you are not going to be able to use an external program to create a new menuitem.

    -a
  • bramantebramante Member Posts: 11
    Thank you. What programming language is that and what development environment would I use to develope in using your sample code? How would I open and/or acquire this development environment?

    When you say: "you are not going to be able to use an external program to create a new menuitem", does that mean that it is physically impossible for a Navision user to click on an executable that I have created and have that executable create a menu item in that users installed Navision application?
  • SavatageSavatage Member Posts: 7,142
    are you trting to create an ADD-ON product?
  • awarnawarn Member Posts: 261
    You use Navision code to code in Navision, and yes I mean you are not going to be able to create code in an external product to create 'objects' in Navision.

    Navision is not object oriented.

    -a
Sign In or Register to comment.