Search code examples
c#.netmicrosoft-dynamics

Dynamics NAV RTC : Command Line Parameter Passing


I am currently developing a system that will allow for an external piece of software to click a button and his will then execute some c#.net code that plans to call the Dynamics NAV RTC by using the following code.

Process.Start("Microsoft.Dynamics.Nav.Client.exe");

The external application contains variables that I would like to pass through to the NAV CRM.

Is there a way that i could do this by Passing the parameters like what you would with a web address similar to the way below:

Process.Start("Microsoft.Dynamics.Nav.Client.exe",  "DynamicsNAV://localhost:7046/DynamicsNAV70/CRONUS%20UK%20Ltd./RunPage?Page=50000&No=10");

The above line doesn't work. I receive the followowing error:

Priming dictionary contains a key 'no' which is not allowed

Parameter name: primingDictionary

Does anyone in the community know how I could produce this functionality in a similar way?


Solution

  • you can use it like that:

    ProcessStartInfo psi = new ProcessStartInfo("Microsoft.Dynamics.Nav.Client.exe",
                "DynamicsNAV://localhost:7046/DynamicsNAV70/CRONUS%20UK%20Ltd./RunPage?Page=50000&No=10");
    Process.Start(psi);
    

    the first argument is the process itself, the secomd is the argument.

    you can change them as you'd like

    you can learn on the argument NAV accept here