Add a Link Control

              

Expand/Collapse all Show/Hide All

Expand/Collapse item  Overview

You can add a link control button to display images, play multimedia files, run programs, open a new dialog box, or perform DDE scripts and MS scripts. Link controls are especially useful because you can create scripts that include data values from the module panel. The link control functions similarly to a button; many of the control properties are identical to that of a button control. Link control names start with the BT_ prefix, because they are considered to be a type of button control.

You can also run tasks from a customized panel using program links defined in the External Link Definition window. For example, you can access the Inventory Management Item Inquiry window from Sales Order Entry by clicking a Link Control button.

You can also run external programs or tasks from a customized panel (for example, run a Windows program from outside of Sage 100 by clicking a Link Control button) using program links defined in the External Link Definition window. You can also specify a script file that contains DOS/Windows commands using references to control data values on the panel.

 

Use one of the following methods to add a link control:

 

To add a link control

  1. Select Custom Office Main menu > Customizer Selection. Select the panel to add a link control to. For more information, see Select a Panel.

  2. On the Customizer Toolbar, click the Add External Link button.

  1. On the panel, click and drag to position the button that will activate the external link.

  2. In the External Link Definition window, on the Link Settings tab, select the link Type option. For more information, see External Link Definition - Fields.

Note To add an MS Script link, see Create an MS Script Link.

  1. In the File Name field, enter the file name of the data file or script file. To create or edit the script for the link control, click the Script Editor button.

  2. Enter the appropriate information in the remaining External Link Definition tabs and click OK.

The link control is added.

 

Expand or collapse item  Example - Adding an image script

The following script is an example of an image type link control script that can be used with the Inventory Management Item Maintenance panel. This script launches an image associated with the item code. The image is located in the Images folder. The script file SAMPLE2.txt is located in the SCRIPT folder.

["../IMAGES/ABC/abc_" + STP(ML_ITEM_NO$,2) + ".jpg"]

 

To use the script

  1. In the Accounts Payable Terms Code Maintenance window, launch the Customizer module by pressing CTRL+F9.

  2. On the Customizer Toolbar, click the Add External Link button and create an image type link control on the main panel.

  3. Type ..\cm\script\sample2.txt for the script file.

  4. Save the changes and exit the Customizer module.

  5. In the Accounts Payable Terms Code Maintenance window, select a code and, on the Toolbar, click the Add External Link button.

The images display for term codes 00, 01, and 02.

 

To add a link to a Sage 100 program

  1. Select Custom Office Main menu > Customizer Selection. Select the panel to add a link control to. For more information, see Select a Panel.

  2. On the Customizer Toolbar, click the Add External Link button.

  3. In the External Link Definition window, on the Link Settings tab, select the Program option. For more information, see External Link Definition - Fields.

  4. Enter the Module and Task fields.

Note  You cannot enter the program name or edit a script when linking to a Sage 100 program.

  1. Enter the appropriate information in the remaining tabs and fields, and click OK.

The link to a Sage 100 program is added.

 

To add a link to run an external program

  1. Select Custom Office Main menu > Customizer Selection. Select the panel to add a link control to. For more information, see Select a Panel.

  2. On the Customizer Toolbar, click the Add External Link button.

  3. In the External Link Definition window, on the Link Settings tab, select the Program option. For more information, see External Link Definition - Fields.

  4. In the Module field, select [External Program].

  5. In the Program field, enter the path to the executable program or enter a text file containing a command script. If the path name to the document contains one or more spaces, enclose the path to the document name in quotation marks. Click OK.

The link to run an external program is added.

Expand or collapse item  Example - Entering a path to an executable program

C:\Program Files\Microsoft Office\Office\Winword.exe

 

Expand or collapse item  Example - Entering a path to a document

C:\My Documents\Word\User Defined Fields.doc

© Sage Group plc 2019. Privacy Policy | Copyright/Trademarks