Is it possible to use the internal ID of the apply...
# suitescript
g
Is it possible to use the internal ID of the applying transaction from a saved search to then load the applying transaction instead of the current internal ID? i.e. sales order saved search with applying transaction invoice's internal ID on the result. Then using the internal ID of the invoice to store and then go that record instead? snippet below - Scheduled script The obvious answer would be to create a saved search of the invoice instead however not looking for that as the solution pls..
Copy code
function (record, log, search) {
        function execute(context) {
            let searchObj = search.load({
                id: 'customsearch_abc'
            });

            let internalIdsStore = [];

            searchObj.run().each(function (result) {
                let id = result.id;
                internalIdsToStore.push(id);
                return true;
            });
n
"[...]and then go that record instead" you wouldn't navigate to a record in a saved search in a server side script. Otherwise you will probably be using (see image) The alternative, if you are doing this in client script, could be to update the window.location to reflect the URL of the record you want to navigate to.