xTuple Logo Solutions About Us Resources News
Our Products
xTuple Open Source ERP Products
PostBooks
Standard Edition
OpenMFG Edition

Free Demo Download
 Please login:
username:
password:
 ... or click here to register:

  ... End Users
  ... Solution Providers

More Open Source
 OpenRPT Report Writer
 PostgreSQL Database
 Pricing for all services


xTuple ERP 3.0 won the LinuxWorld product excellence award for best Business Application! Read more here!


xTuple has also been recognized as a "Market Leader" by CRM Magazine, for "helping companies streamline business processes, maximize profitability, and provide more value to customers" with the integrated CRM functionality in xTuple ERP.

Our Community
 xTuple.org Home
 Forums & Mail
 Issue/Bug Tracker
 Search xTuple.org
 Downloads

Industry case studies
 Automotive aftermarket
 Bearings and pulleys
 Fresh/frozen foods
 Garments (make to order)
 Inks and ink technology
 Pumps and valves
  - View all case studies

10.12.20.  Custom Commands

If you want to execute external programs from within the menu structure, you can do so using the Custom Commands utility. This utility enables you to create custom menu options, which users may then select to launch specified programs. Custom Commands are well-suited for running custom reports. However, they may be used to execute a wide range of programs, for a variety of purposes. To access the master list of Custom Commands, select the "Custom Commands" option. The following screen will appear:

Custom Commands List

Note

There is no limit to the number of Custom Commands which may be added to a module. Executable programs may be launched from local or network drives.

The Custom Commands master list displays information on all Custom Commands, including module name and menu label.

To the far right of the list, the following buttons are available:

CLOSE

Closes the screen, returning you to the application desktop.

NEW

Opens screen for adding a new Custom Command to the master list of Custom Commands.

EDIT

Enables you to edit highlighted Custom Command definitions. The edit screen is the same as that for creating a new Custom Command definition—except that when editing, the fields will contain Custom Command information. Double-clicking on a Custom Command definition will also bring you to the editing screen.

DELETE

Highlight a Custom Command definition and then select this button to remove the Custom Command from the master list.

10.12.20.1. Custom Command

To create a new Custom Command, select the NEW button. The following screen will appear:

Enter New Custom Command

When creating a new Custom Command, you are presented with the following options:

Module

Select the name of the module where you want the custom menu option to appear. You may create Custom Commands for any of the modules within the system. By default, a menu option named "Custom" will be added to the bottom of a module's menu structure when a Custom Command is created for that module.

Menu Label

Enter a name to identify the Custom Command as it will appear on the menu structure. The menu label will become a subset of the "Custom" menu option appearing at the bottom of a module's menu structure. Each menu label should be used to describe a separate Custom Command. There is no limit to the number of Custom Commands which may be added to a module.

Priv. Name

Enter a name to describe the privilege associated with the Custom Command. By associating a privilege with a Custom Command, you gain the ability to grant or withhold access to the menu option on a user-by-user basis. Users who have been granted the privilege will have access to the Custom Command; all others will not.

Executable

Enter the path to the location where the executable program you want to launch is located. The executable program specified here will be launched when users select the associated Custom Command menu option. For example, if you want to run a custom report, specify the location for the standalone report renderer ("RPTrender"). The following examples illustrate how (on Windows) you can map to either local or network drives:

Example 10.6. Custom Windows Paths

Local Drive: C:\\Program Files\\OpenMFG\\RPTrender.exe

Network URL: \\\\drive_name\\dir_name\\OpenMFG\\RPTrender.exe


Note

You may encounter cross-platform conflicts when placing executables on network drives. To reduce these conflicts, it may be necessary to create separate custom menus to support executables designed for different operating systems.

Tip

Macintosh users should enter an executable path which points all the way to the executable file located within a package's Contents directory. For example, to launch the report renderer, enter the following path: ../rptrender.app/Contents/MacOS/rptrender. Under Mac, the RPTrender application will not open if the path does not continue past the rptrender.app file.

Description

Enter text to describe the Custom Command.

If you want the system to pass parameters or other arguments to the specified executable program when it is launched, select the "Arguments" tab. The following screen will appear:

Custom Command Arguments

Note

While the examples shown here emphasize arguments passed to the report renderer, you may pass arguments to any other program executed from a Custom Command menu.

The arguments display lists all arguments defined for the specified executable program. The arguments shown in the example illustrate typical arguments needed to run custom reports from the system. As the example shows, the following arguments will be passed to the RPTrender application when the Custom Command is executed:

Table 10.3. Arguments Used for Custom Reports

Syntax

Description

-databaseURL

Used to specify the location of the database server. In the example shown, the prefix "psql://" indicates a connection to a PostgreSQL data base. This is followed by the server address, database name, and port number. When the report renderer (RPTrender) is launched, the program will automatically connect to the database specified.

-username

Enter the username RPTrender should use to connect to the specified database.

-passwd

Enter the password for the specified user.

-param

Enter any parameters you want the system to pass to the report renderer. These pre-defined parameters will be used when RPTrender runs the specified report definition.

-print

This argument tells RPTrender to print the specified report definition using the indicated parameters -- if any.

-close

Use this argument to close the RPTrender program when its work is done.


To the far right of the screen, the following buttons are available:

CLOSE

Closes the screen, returning you to the application desktop.

NEW

Opens screen for creating a new argument.

EDIT

Enables you to edit highlighted argument definitions. The edit screen is the same as that for creating a new argument definition—except that when editing, the fields will contain argument information. Double-clicking on an argument definition will also bring you to the editing screen.

DELETE

Highlight an argument definition and then select this button to remove the argument from the list.

10.12.20.1.1. Custom Command Argument

To create a new argument for the system to pass to the specified executable program, select the NEW button. The following screen will appear:

Enter Custom Command Argument

When creating a new argument, you are presented with the following options:

Order

Specify the order in which the argument should be passed to the specified executable program.

Tip

You can change the position of an argument as it appears on the list by editing the argument and changing its order number.

Argument

Enter the argument you want the system to pass to the specified executable program.

To the far right of the screen, the following buttons are available:

CANCEL

Closes the screen, returning you to the application desktop.

OK

Saves the argument information.


 
Copyright © 1998-2008 by xTuple. All rights reserved. 
 

SourceForge.net Logo