I guess this must be a common problem! But it just happens to be a problem I haven’t had before.
So instead I added one extra line of code to fire the onchange event in my account type field. Which in turn triggered the business rule. Meaning I didn’t have to write more code. This made me happy!!
So you’d add something like <<FormContext>>.getAttribute(“myattribute”).fireOnChange(); (As in my example below.)
var newValue = “Bla bla bla”;
var accountType = context.getAttribute(“new_accounttype”);