Thursday, September 19, 2013

NAV Classic - Open a Form at windows Start-up.

Hi all,

As discussed earlier how to open a specific database from the command line.

Let's see today one more customer requirement that a particular for should open on the start-up of windows.
Yeah we can use the start-up in windows but it accepts the command / shortcut that need to run when windows start.

But this time we don't require just a database to open but a form which get opened automatically.

Pr-requisites -

The command that we will see in this post will only run if the Navision is installed (Specific version that we want to run).

Reason - The command take client information from registry.

Additional Information -
 a) Parameter separator - %26
 b) Space Representation - %20

So lets begin.

HARD WAY -(Which explains you all the parameters).

a) so as the client information will be picked from registry, I can use below command as my first parameter -
  • navision://client/run?
b) Now I need to specify server name -
  •  Server name=TestServer
  • Only in case of SQL Server.
c) Now database name with a parameter separator (database name have space so we will also use %20)-
   * %26database=Demo%20Database%20NAV%20(6-0) (SQL SERVER)
   * database=d:%5Cnav%206.0%20r2%20in%5Cdatabase.fdb
   * Where %5c is used to specify "/".

d) Now the company Parameter.
   * %26company=CRONUS%20India%20Ltd.

e) Now the target object to run (Say form 42 Sales order)-
   * %26target=Form%2042%26

f) Now at the end the server Type -
   * %26servertype=MSSQL (SQL SERVER)
   * %26servertype=NAVISION (NATIVE DATABASE)

So my Complete command is -

SQL Server -

navision://client/run?servername=TestServer%26database=Demo%20Database%20NAV%20(6-0)%26company=CRONUS%20India%20Ltd.%26target=Form%2042%26view=SORTING(Field1,Field3)%20WHERE(Field5796=1(''..26/11/12))%26position=Field1=0(1),Field3=0(1003)%26servertype=MSSQL

Native Server -

navision://client/run?database=d:%5Cnavision%20softwares%5Capplication%20setup%5Cnav%206.0%20r2%20in%5Cdatabase%5Cdatabase.fdb%26company=CRONUS%20India%20Ltd.%26target=Form%2042%26view=SORTING(Field1,Field3)%20WHERE(Field5796=1(''..26/01/11))%26position=Field1=0(1),Field3=0(2001)%26servertype=NAVISION

Create & Copy the shortcut on start-up folder and next time you will login to system the object will be running directly.

This post was just to explain you all the parameter of the command but there is a easy way to do it. Sorry for wasting your time.

Easy way -
  • Open Navision client.
  • Open Object that you want to run.
  • In case of Report/Dataport Specify the filters/options that you require.
  • From File Menu select Send, Link to Desktop.
  • A shortcut will be placed on desktop.
  • just check the properties of the shortcut you will find a command as specified above.



Copy the shortcut created on start-up folder and next time you will login to system the object will be running directly.

The reason behind the hard way is to be able to modify the command if required or to resolve issue. (You should not feel lost when you see the above command).

In next post we will see how to map different RTC Database on shortcuts.

Regards,
Saurav Dhyani

No comments:

Post a Comment

Popular Posts