If I use redirectUrl: “EditForm.aspx” in SharePoint 2010 in a Dialog, the dialog parameter ?IsDlg=1 gets lost. If I use redirectUrl: “EditForm.aspx?IsDlg=1” the final URL is in an invalid format like EditForm.aspx?IsDlg=1?ID=169.
Comments: In 2013.01ALPHA6, changed the creation of the redirectUrl so that it adds an ampersand instead of a question mark if there's already a question mark. i.e., append to the existing query string if there is one. location.href = thisRedirectUrl + thisRedirectUrl.indexOf("?") > 0 ? "&" : "?" + opt.qsParamName + "=" + lastID + ((typeof queryStringVals.RealSource === "string") ? ("&Source=" + queryStringVals.RealSource) : "");
Comments: In 2013.01ALPHA6, changed the creation of the redirectUrl so that it adds an ampersand instead of a question mark if there's already a question mark. i.e., append to the existing query string if there is one. location.href = thisRedirectUrl + thisRedirectUrl.indexOf("?") > 0 ? "&" : "?" + opt.qsParamName + "=" + lastID + ((typeof queryStringVals.RealSource === "string") ? ("&Source=" + queryStringVals.RealSource) : "");