View Events, Scripts & WF
Select a Sage 300 View to be configured with Extender.
By clicking on the “All Views” info icon (or use F6 key) , you can select the appropriate view from the list of available views, active in your Sage 300 database.
Fields and Controls
You can determine what fields Extender need to track the original value for. This is particular useful for email messages.
-
Leave blank if you don't need the original value in the Script, workflow or email messages.
-
You can enter the field names you need. For example, if you only need the original value for the Description and the name, “DESC,NAMECUST”
-
Use * if you want Extender to make the original value available for all fields. This is useful if you use the original values in a script, in email messages or in a workflow, but you don't want to list all the fields you need in advance.
You can also add code in the script to determine what fields the script needs the original value.
Refer to Scripts Advanced Tips
Events Tab
On the Events tab, you can attach an Event Type to an Extender View operation and/or View field/fields.
Requirement! The Events Tab is available if using Extender Levels Configurator, Customizer or Developer
Select the appropriate view field from the list of available view fields. All view fields will be available, including the following standard operations of a Extender view
-
Delete : when a view record is deleted
-
Insert : when a view record is inserted
-
Update : when a view record is updated
-
Update and Insert <UPSERT>: when a view record is updated or inserted
Set to No if you want to Deactivate an Event temporarily without deleting it.
Select the appropriate Event Code from the list of available Event Types.
If you need to log the Before and After Value, you need to make sure the event type you select has been configured as "Don't Combine".
If you select the View Operation {INSERT}, {UPDATE} or {UPSERT}, the Before and After values will be available if the event is configured as "Don't Combine". One record will be added to the LOG or emailed for each field that is changed.
For the "Delete" action, only one record will be logged.
Refer to Event Types.
Scripts Tab
On the Scripts tab, you select the Python script to be run when the selected view is being updated. Multiple scripts can be selected, and are run in the order specified.
Requirement! The Scripts Tab is only available if using Extender Levels Customizer or Developer
You can activate or deactivate a specific script without deleting it from the View
If multiple scripts have been defined, you can select the order in which they run by entering a number associated with each script. A script associated with Run Order 1 will run before a script associated with Run Order 2 etc.
If you are uploading a new script, click F6 to browse and find the .PY file to attach to this view. When selected the script will be
-
Copied to the associated COMPANY directory, and this is where the “.PY” file will be invoked from
-
Imported into the database
If you are attaching a script which already exists in the database, click F9 to find the existing script, and associate with the current view.
If you want to edit an existing script, click F9
Shows blank or “Checked Out” if currently checked out. In order to check out a script for amendment, you can right hand mouse button on the script row, and select Check Out. Once checked out you can open (to edit the script), and upload (to replace the existing script with the amended script).
User id who currently has the script checked out
Tip: Once you have uploaded a Script and it is active against a view, you can “check out” the script to make changes to the script, to test the script while leaving the original script active. Once you “check in” the script, the existing script will be replaced with the new script.
Your scripts can contain up to 4 parameters.
You can access the parameters in the Python script with the global variables Parameter1, Parameter2, Parameter3, Parameter4.
Note: The first few rows of the highlighted script will be shown to assist with the commenting and verification of the attached scripts.
Tip: To check out, open, upload or Undo Checkout, right hand mouse button on the required script and select the required action.
If you need to amend a script after it is attached to a view, you need to check it out, open it to make the changes, save the script and check it in to enable the changes.
If the script is amended on a separate machine, you need to re-import the PYTHON script
When PYTHON scripts are attached to a view they are
- Imported into the associated database, so the script will dump and load with the database
- Copied to the Company directory, where the PYTHON script is run - If you edit the script directly in this directory, your changes might get overwritten.
OCX Scripts do not need to be added to a Sage 300 View. The script name matches the Sage 300 screen Roto ID to indicate that the script is enabled.
Workflow Tab
On the Workflows tab, you can attach a Workflow Template to a Extender View operation and/or View field/fields. The workflow will start automatically when the view is used in Sage 300.
You can use F9 to open the Workflow Template screen from the Screen.
Requirement! The WorkflowTab is available if using Extender Levels Configurator, Customizer or Developer. If using Configurator, you can only use pre-configured actions in the workflow template.
Select the appropriate view field from the list of available view fields. All view fields will be available, including the following standard operations of a Extender view
This allows you to attach a Workflow Template to
• Any field. If a field has an Active Workflow Template, the new value entered will be stored in “{NEWVALUE}” and the original value reset before the record is saved. This new value will be available in the workflow
• Insert/Update/Delete. The record will be saved and then the workflow will be started.
-
Delete : when a view record is deleted
-
Insert : when a view record is inserted
-
Update : when a view record is updated
-
Update and Insert <UPSERT>: when a view record is updated or inserted
Set to No if you want to Deactivate an Event temporarily without deleting it.
Select the appropriate Workflow from the list of available workflow templates. Workflow Templates - Screen Guide
Select the step that will be run when the field changes / view operation completes.
You can pass up to 4 parameters to the workflow.
To use the parameter value in the workflow, use the SetValue action. You can use {$1}, {$2}, {$3}, {$4} to set the value to a field.
For details and examples, Using Parameters in Workflow
Workflow is only available for flat views: Master files (e.g. A/R Customers), Transaction Header views (e.g. O/E Header) or Batch Header view (e.g. A/P Invoice batch)
- If you select Export, then only the current View configuration will be exported. The export includes the attached events and scripts.
- If you select Export All, then all the current View configurations will be exported. The export includes the attached events and scripts for all configured views. The export format is proprietary, and cannot be changed.
Note: Different options are available depending on the level of Extender you are running.