Howdy ya'll - I'm trying to create a scheduled scr...
# suitescript
s
Howdy ya'll - I'm trying to create a scheduled script to update the Owner on ~100 Saved Searches, but I'm having trouble with the submitFields function, since I can't find the "Saved Search" Record Type (record.Type.SAVED_SEARCH_ doesn't work). Anybody ever manipulate Saved Searches in mass like that before?
a
I don't think submitFields works on lists..
s
Thanks for the response, @AFL - bummer to hear. What do you think you would do in this situation then if you needed to update the owner of 100+ Saved Searches?
Just suck it up and do it manually?
a
I would think so.. I am not positive you can script on searches like you want to and you also can't inline edit them from what I can tell either. hopefully someone else knows the trick
s
Yeah you're right - you def can't inline edit them either. Shucks X 10. But actually, now that I look at only the searches I can even edit (i.e. filter out where it came from a Locked Bundle), there's only ~70... Which is a little better. Anywho, thanks for the reply!
a
@Sirus Badiee Your best bet which is tricky and hacky would be to load the search, iterate over the filters and columns, create a new search and save it. You would be cloning the searches and they will be created with the user running the script as the owner, I don't think there is another way.
🔥 1
s
As much as I like the idea of creating something like that (actually sounds kinda fun), I don't know if that would exactly work - since I'm almost certain there are some hyperlinks to the searches on some Excel docs that the accounting team uses... Plus I know some of them are used in scripts and then I would have to deal with the ID situation. Either way, I appreciate your response though and it's looking like I gotta suck it up and knock it out.