Is it possible to use a csv import to perform an u...
# csvimports
d
Is it possible to use a csv import to perform an update of the Owner field on a large number of scripts? I want to make myself the owner of all of our scripts because the former admin of our account left the company. And we have the scripts set up to notify the owner when a failure occurs, so I want to make sure I'm aware of all of the errors. But I don't see Scripts as an option in the csv import process.
j
I had to do the same thing at my company 2 jobs ago back in 2016. There wasn't any way to do it then, so unless things have changed since then, no. It really didn't take that long once I sat down and committed to doing it. Got through 450+ scripts in a little over an hour.
Also - be kind to the next guy/gal - set all your script errors to all "all admins" rather than making yourself the owner or just setting it to you.
r
A shortcut (though probably not the "proper" way to do it) is to build a Server Script Log schedule saved search that fires its result set off to you (or a group of people) every 30 minutes. You'd want to filter it down quite a bit though so you're not getting 25k records every 30 minutes.
t
Also, I highly recommend creating an admin user that isn't you that can be passed on to the next admin very easily. We use an email alias like netsuite@yourcompany.com for this account, and forward all emails to that address to go to the people of your choosing. That way, you don't have to worry about updating owners of scripts or workflows. It also gives you a second account to be in next to your own account, which makes it super helpful to be in your sandbox and production accounts at the same time.
👍 2
j
@Tim_Pedersen I dig the service account suggestion, but you do know you can be logged into sandbox and production at the same time from any normal login? Just navigate away to the sandbox account and then click the login button on the other tab that has been logged out. Now you're in both accounts on two separate tabs. There's a quick explanation/video here: "Logging in to Your Sandbox Account" SuiteAnswer ID 45060.
t
I've done that too, and it seems to log me out at times that are bothersome. The other benefit is the capability to be logged in to a SingleSignOn role in one browser, and an admin role in another. I've found this helpful when troubleshooting with a co-worker when I needed to log into NetSuite as their role while still being able to access an Admin role at the same time.
m
A generic admin account sounds like an audit nightmare. We use a group for script error notifications. Regarding the original question, it might be possible with celigo dataloader (Free tier)
m
@michoel I was thinking the same thing. @Dan Warner what is the actual name of the NetSuite record you would be updating?
d
@matt.graney recordType="script", if that's what you're asking. I am trying to update a bunch of scripts, so I can't list them all in a comment here due to volume, and they're all custom scripts or scripts from bundles. So the name of those scripts won't mean much to anyone else.
e
you should be able to create a saved search based on owner, use the saved search on a scheduled script, and do a submit record on the results, such as: record.submitFields({type: record.Type.SUITELET, id: 1234, values: { owner: 1234 }
the script record types should be: record.Type.CLIENT_SCRIPT record.Type.SCHEDULED_SCRIPT record.Type.USEREVENT_SCRIPT record.Type.MASSUPDATE_SCRIPT record.Type.RESTLET record.Type.MAP_REDUCE_SCRIPT record.Type.PORTLET record.Type.SUITELET
m
Yes @Dan Warner, I was wondering about the recordType. We support Suitelet, for example. https://www.netsuite.com/help/helpcenter/en_US/srbrowser/Browser2016_2/script/record/suitelet.html
in fact, all the script record types @Eddy Morales listed above.