generate/cbs2.gif Catalog Wizard Stock Hook (R-STWIZS.MAC) generate/enh74c.jpg


 

This script file must be located in your CAPITAL program directory and must have the file name R-STWIZS.MAC.

Entry Values

Variable

Purpose

Stock->X

You may query the contents of the fields of the stock record.

Staux000->X

You may query the contents of any user fields if applicable.

Supplier->X

You may query the contents of the fields of the supplier record for the related stock item.

Suaux000->X

You may query the contents of the fields of the supplier user fields record for the related stock item.

Return Values

Value

Meaning

0

Exclude the stock item from the catalog.

1

Include the stock item within the catalog.

2

Let the Catalog Wizard decide if the stock item should be included in the catalog. Do not take any special actions here.

Description

If this script exists, it will be execute each time the Catalog Wizard is presented with a stock item to add to the catalog. Only the stock items in the stock table that match the user's specified location will be presented to the script. If multi-location stock control is not activated, all stock items in the stock file will be presented, including stock items on hold.

Example

In this example stock items that are considered by CAPITAL as items not to be reordered, are excluded from the catalog.

If Val(Stock->Reorder) = 0 .And. Val(Stock->Overstock) = 1

   Return 0

Endif

Return 2

____________________________

Related Topics:

Catalog Wizard

Catalog Wizard Templates

Scripting Hooks

Script Programming

Stock Control Concepts



Help Topic Map