BUT when we directly run the same saved search the...
# general
e
BUT when we directly run the same saved search then it returned 0 rows
b
generally a role or classification issue
what type of script is it
e
userevent
b
whats the value of the
Execute as Role
for the script deployment
e
i am only created saved search and adds filter nothing else
and load it in my script
Not explicitly added any roles...
b
the
Execute as Role
is a field on the script deployment record
e
checking
message has been deleted
b
thats the Audience subtab
the
Execute as Role
is a field on the main section of the script deployment form
e
i got it
message has been deleted
b
that looks normal
what are the filters of the search in the ui
wait a minute, are you sure this is a user event script
the screenshot of the script that you have shared are a suitelet
e
o sorry you are right script is suitelet
if the script is suitelet then what I should check
b
filters from the search in the ui
potentially the code you used for your search
e
var updatedProducts = search.load({id : "customsearch872" }); var resultset = updatedProducts.run(); var results = resultset.getRange(0, 100); log.debug({title: 'Total Load Record' , details: results.length});
Filters of my item:savedsearch
b
my only guess is that the your relative date filter on last modified is giving you issues
try removing the last modified date filter (or try using a specific date instead of a relative one)
that said, last modified can potentially give you different results if you run the searches at different times since records could have been modified between when you ran the first search and then the other
e
no i run on same time and getting different result
Getting the same issue on setting a specific date on last modified
I also checked without lastmodified filter but no success
b
unless you are running the script and search with different users or roles, i dont see how that happens. you might want to look at the search results from the script to see if there is anything weird about them