Redirecting to a Specific Subtab in NetSuite When Opening a Record

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",
        },
    });
}


Leave a comment

Your email address will not be published. Required fields are marked *