Can't open panel from toolbar button

Hello @Unknown,

f you want to redirect users to Edit Form and keep the panel opened, you can do that using this code:

fd.spSaved(function(result) {
    var listId = fd.spFormCtx.ListAttributes.Id;
    var itemId = result.Id;
    if (fd.isPanel) {
        const formCommands = new window.Plumsail.FormCommands({
            webUrl: fd._formManager._webUrl,
            listId: listId,
            listUrl: fd._formManager._listUrl,
            culture: _spPageContextInfo.currentUICultureName,
            language: _spPageContextInfo.currentLanguage,
            componentLoader: window._spComponentLoader
        });
        formCommands.load().then(function() {
            formCommands._openPanel({
                itemId: itemId,
                contentTypeId: fd.contentTypeId,
                formType: "Edit",
                rootFolder: fd.rootFolder
            });
        });
        //close original panel
        fd.close();
        }
});