This script works currently for the create path, b...
# suitescript
n
This script works currently for the create path, but it errors on updates
s
I for one don't condone such open code as this (attempting to just blindly accept any fields coming in from the outside). That said, you may either have a permissions issue or the order in which you're setting the fields is a problem.
n
Its not as open as it may seem, this is strictly being mapped from A to B in a separate middleware service.
All the logic for handling the data/mappings is done via middleware
But also, the order shouldnt be affected as long as the "isDynamic" field is set to false,
s
that last statement isn't always true, in my experience. Another thing to look at is to see if other scripts or workflows might be fiddling the the data during
.save()
💯 1
👀 1
b
the subsidiary logic is likely the problem, you cant change it in the ui
and your attempt to do so causes problems
n
Oh so I should only set it on create then?
Everything is going to the same subsidiary anyway
BOOM it submitted! As always @battk you are a mad genius
😂 1