Is there a more "official/supported/documented" wa...
# suitescript
e
Is there a more "official/supported/documented" way to get the URL of a Saved Search when you have the (non-numeric) id of the search? (ex:
customsearch_my_cool_search
) Something like
url.resolveScript()
but for a saved search? I've found you can enter a numeric or non-numeric id into this URL and it works.. but I was hoping for something that's more documented/official?
/app/common/search/searchresults.nl?searchid=customsearch_my_cool_search
OR
/app/common/search/searchresults.nl?searchid=12345
h
I recently had the same issue and couldn't find anything either so had to settle with
/app/common/search/searchresults.nl?searchid=customsearch_my_cool_search
👍🏻 1
b
e
Hmm, tried the following and it returned a link, but when I open the link it just shows "Your search criteria expired. The criteria for a given search generally expire after 15 minutes of inactivity. Please return to the search definition page and re-submit your search." Tried both of these:
Copy code
url.resolveTaskLink({
id: 'LIST_SEARCHRESULTS',
    params: {
        scriptid: 'customsearch_my_cool_search'
    }
    
})
Which returned:
'/app/common/search/searchresults.nl?compid=XXX_ACCOUNT_ID_HERE&scriptid=customsearch_my_cool_search'
Also tried:
Copy code
url.resolveTaskLink({
id: 'LIST_SEARCHRESULTS',
    params: {
        id: 'customsearch_my_cool_search'
    }
    
})
Which returned:
'/app/common/search/searchresults.nl?compid=XXX_ACCOUNT_ID_HERE&id=customsearch_my_cool_search'
b
you seem to have forgotten that the query parameter is named searchid
☝🏻 1
e
Yep-- tried:
Copy code
url.resolveTaskLink({
id: 'LIST_SEARCHRESULTS',
    params: {
        searchid: 'customsearch_my_cool_search'
    }
    
})
Which returned:
'/app/common/search/searchresults.nl?compid=XXX_ACCOUNT_ID_HERE&searchid=customsearch_my_cool_search'
And this ☝🏻 link works as expected Thank you @battk!