Is there any field or way to filter a search to on...
# suitescript
s
Is there any field or way to filter a search to only find unlocked orders? Currently the results include locked orders and I just catch them in a try/catch when I try to load the record (the error name is
RCRD_LOCKED_BY_WF
) but there's quite a few of them and it would be much better not include them in my loop at all if possible.
b
you can try using the worflow join to exclude specific workflow / states
s
Is there a general "locked" state? I don't know what it would be... I don't see one popping out at me based on the names
b
im not sure. last time i used it i just looked for the workflow state that had the locking action
s
@battk What do you mean by it had the locking action? Where did you see that
b
go through your workflows in your account, find the states that have a locking action, filter on those states
s
Oh I cant do that 😞 I was hoping there would be a generic solution
r
Or you can change the context of the Lock record action to just the UI
s
No I don't think I actually want to access the locked records in my script, I would just prefer if I could avoid finding them in my search results at all