Does anybody try redirecting the current record to...
# suitescript
r
Does anybody try redirecting the current record to another record page with sublist items?
Copy code
var redirectUrl = url.resolveRecord({
        isEditMode: true,
        recordType: record.Type.TRANSFER_ORDER,
        params: {
          "record.custbodysales_order": salesOrderRec.id,
          "record.transferlocation": warehouse,
        },
      });
s
What exactly are you trying to do? What are these params supposed to do when you get to the transferOrder? I also don't see recordId in your call
r
I am currently on a transfer order, and there are checkbox on the current transfer order that it can allow users to check to open a new transfer with these items.
s
I would probably set up a client script on pageInit for transferOrders, and pass a parameter that the client script is looking for
Copy code
nlOpenWindow(
            url.resolveRecord({
                recordType: orderType,
                recordId: null,
                isEditMode: true,
                params: {
                    custparam_myparam: originalId
                }
            })
        );
something like that, and have the client script retrieve the item information you wanna copy
r
I see. Do you know if we can pass parameters with multiple items ID if we are passing them to the new transfer order?
s
You can pass whatever you want as parameters in the url, you need the client script on the other side to know what to do with them.
r
Sounds good!
I will give it a try. Thanks!
m
redirect.toTaskLink(options)