Unfortunately it is not currently possible to do what you're trying. There are two reasons:
- salesOrderList is not scriptable*
- the query that salesOrderList runs is hardcoded‡
* This is an accident of history. There is no technical barrier to making it scriptable; it was simply overlooked when we added application scripting because it's in an unexpected location. For techies: it's in the
widgets directory, not
guiclient, and not all of the widgets were made scriptable (only
documents, and the
VirtualCluster inheritance hierarchy).
‡ You need to change the query for your filter to work. This is possible when the query is stored in the
pkgmetasql tables. This one is built directly in the C++ and is not available to be changed. Again, there is no technical barrier; it just hasn't happened yet.
Both of these are on our list of things to do. A couple of us talked about ‡ a few days ago (this is an issue in a few places); we recognize it is a problem but it's not at the top of our priorities list.
Sorry for the bad news.