Other Transaction Post-Saving Hooks ![]()
The script file must be located in your CAPITAL program directory and must have a file name matching the contents of the following table:
|
File name |
Transaction |
|
R-ORDTEN.MAC |
Sales Order |
|
R-QUOTEN.MAC |
Quotations |
|
R-PURTEN.MAC |
Purchase Order |
|
R-RECTEN.MAC |
Stock Receipts |
|
R-RETTEN.MAC |
Stock Returns |
|
R-REQTEN.MAC |
Requisitions |
|
R-TRATEN.MAC |
*Stock Transfers *Enterprise & Corporate Edition Only |
It is executed after a transaction is saved.
Entry Values
None.
Return Values
None.
Example #1
* Sales Order Script
* Prompt the user for 'home' or 'store' delivery
* and store the resulting selection in the sales
* order Other Reference field.
FormCreate()
FormAdd("Delivery", 1, { "Home", "Store" } )
If .Not. FormShow("Type of Delivery")
Return FALSE
Endif
If FormResult(1) == 1
Orders->(Write("OOURREF", "HOME"))
Else
Orders->(Write("OOURREF", "STORE"))
Endif
Return TRUE
Example #2
* Send an order acknowledgement as soon as
* a sales order is entered in the system.
Declare MyScript Type Character
___________________________
Related Topics:
Other Transaction Pre-saving Hooks
![]() |