To access a record in view mode with a custom subtab selected.

         let recordId = scriptContext.newRecord.id;
          let recordType = scriptContext.newRecord.type;

          if (checkForParameter(recordId)) {
            let currentUrlParam = scriptContext.request.parameters;

            if (currentUrlParam["selectedtab"] != "custpage_create_box_subtab") {

              redirect.toRecord({
                type: recordType,
                id: recordId,
                parameters: {
                  selectedtab: "custpage_create_box_subtab",
                },
              });

            }

Leave a comment

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