In the UI, you can build the search using the "App...
# suitescript
e
In the UI, you can build the search using the "Applied To Transaction..." join