NetSuite provides the redirect.toRecord() API in SuiteScript 2.0, which allows developers to redirect users to a specific record. By passing the selectedtab parameter, you can control which subtab is displayed when the record loads.
if (currentUrlParam["selectedtab"] != "custpage_create_box_app_subtab") {
redirect.toRecord({
type: recordType,
id: recordId,
parameters: {
selectedtab: "custpage_create_box_app_subtab",
},
});
}