Does anyone know a way to pull a history of saved ...
# suiteanalytics
j
Does anyone know a way to pull a history of saved searches run by a particular user? I know I can go into each search one by one in the UI and look at execution log, but we have thousands of searches so this is not practical.
r
I don't think there's a way, though if you find one, I'd be interested. I don't think anything related to the Execution Log is stored anywhere. I think even something like Strongpoint doesn't have this level of tracking.
t
@jen You can query the usrsavedsearchexec table. Something like this:
Copy code
SELECT TOP 10
	TO_CHAR ( usrsavedsearchexec.dateexecuted, 'DS TS' ) AS DateTime,
	BUILTIN.DF( usrsavedsearchexec.internalid ) AS Search,
	Entity.altname AS User,
	Role.Name AS Role
FROM 
	usrsavedsearchexec 
	INNER JOIN Entity ON
		( Entity.ID = usrsavedsearchexec.executedentityid )
	INNER JOIN Role ON
		( Role.ID = usrsavedsearchexec.executedroleid )
ORDER BY 
	usrsavedsearchexec.dateexecuted DESC
😲 1
🙌 2
r
Oh nice @tdietrich. Is that table exposed via SuiteQL or is that through netsuite2.com via SA Connect? That table isn't in netsuite.com. I'm guessing it's available in SuiteQL?
j
wow. @tdietrich how do you figure this stuff out when it’s not documented?
Hm
this is not the right table for my needs, I don’t think. It only has 25 results in total (i.e.
SELECT * FROM usrsavedsearchexec
returns 25 results only) though we run hundreds of searches daily and have been operating for 15 years on NetSuite.
and some of the search internal ids have very odd values, e.g.
-5050347871433095
b
j
regardless, the results are wrong