Since your code has a ```nlapiSetFieldValue``` cal...
# suitescript
r
Since your code has a
Copy code
nlapiSetFieldValue
call, the script is executed for each call of this API. This is causing the infinite loop, what you can do is use the parameter
Copy code
fireFieldChange
and set it to false. I would also recommend that you set the
Copy code
asynchronous
parameter to true. The updated
Copy code
nlapiSetFieldValue
call will look like this
Copy code
nlapiSetFieldValue('undepfunds', 'F', false, true)