run script


The run script statement runs the change script for a given field.


run script field_name


field_name – The name of the field whose change script will be run.


This statement is useful when the value in the field is changed by another script and the change should be acted upon. This statement is also useful if there are several fields that use the same script, as it allows you to place the script on one field and then simply run it from the other fields, rather than re-creating the same script for each field.

The run script statement requires an additional call stack. For information about call stacks, refer to Call Stacks.

We suggest that you use form procedures in place of field change scripts started with the run script statement.

You can’t use the run script statement to run a field change script containing the old() or diff() functions. These functions won’t work because the focus isn’t on the field whose change script is being run.

If you’re integrating with Microsoft Dynamics GP, you won’t be able to run a field’s change script using the run script statement, if the script contains the old() or diff() function. If you’re running your own field change script, duplicate the functionality of the script by using a form procedure. Pass the current and previous values of the field as parameters for the form procedure. This will allow you to use the script’s functionality from any fields in the dictionary, rather than just one specific field.

Documentation Feedback