Thanks all, I was able to get it working. I had to first set a condition inside the fieldChanged function that looks for a change to 'item', and then sets quantity to 0. I then used the validateLine function to check if quantity == 0, and if yes I return false, which stops the line from being submitted.