There's a script I want to run on the Journal Entr...
# suitescript
d
There's a script I want to run on the Journal Entry record; I'd like it to check the account type for all lines and, if they are "Bank" accounts, to set a custom field in the header. Is that a Validate Line function or a Field Changed function (or both)?
m
If you only care about this logic being applied in the UI, then I would probably go with validateLine. The scenario sounds like a better fit for a user event script rather than a client script though to make sure it works on JEs that are not created manually in the UI (e.g., CSV Import).
👍 1
r
You can do this in the saveRecord client event so that the user is done adding lines before you set the custom header field