In case you ever need to redirect to search result...
# suitescript
e
In case you ever need to redirect to search results using the
ServerResponse.sendRedirect()
method, I just found that this doesn't work:
Copy code
var searchId = /* your id */;
        context.response.sendRedirect({
            type: https.RedirectType.TASK_LINK,
            identifier: "LIST_SEARCHRESULTS",
            id: searchId
        });
but this does work:
Copy code
var searchId = run.getCurrentScript().getParameter({name: "custscript_atr_short"});
        context.response.sendRedirect({
            type: https.RedirectType.TASK_LINK,
            identifier: "LIST_SEARCHRESULTS",
            parameters: {
                searchid: searchId
            }
        });
👍 1