I have created a simple workflow and script to display fields that have been modified in a PO where the cost is over $10,000. This works by checking the [M] field against the base [F:POH] field, and using RETVAL to display the changed information if [M]FIELD <> [F:POH]FIELD. For testing purposes, I have only written the script to detect and change in the internal reference field, ORDREF. The workflow looks like this:
And the script looks like this:
I am wondering if it is possible to check for added, deleted or changed lines in the lines array. This would be especially useful to catch changed quantities, gross prices or new items that are added on after the fact. Since our POs that are more than $10,000 often have over 300 lines, it is not really possible to check for a difference if we were to just display all the lines and info every time a modification is made, so I would like to limit it to only the lines that have had a change made.
In the code there, I have already added a link between PORDERP and PORDERQ in order to display the information as needed, I just do not know the syntax for checking for changes outside of the static header fields where you can just check for difference with [M].
The current output of the email using the ORDREF field as a test looks like this: