Hi, I have a modal dialog with a number of links that when clicked should create a new item in a document library. This uses the createNewDocumentWithRedirect2 function and accepts a number of parameters. The second function that runs onclick is a call to the SP.UI.ModalDialog.commonModalDialogClose function. What happens in reality is that on clicking a link the dialog window closes but no new item is created. If I don't include the modal dialog close function then the document does get created so I know that the links are correctly formed. Any ideas why chaining these two functions together wouldn't work?
onclick="javascript:CoreInvoke('createNewDocumentWithRedirect2', event, 'http:\u002f\u002fsharepoint\u002fDocuments\u002fForms\u002fGuidelines\u002ftemplate.dotx', 'http:\u002f\u002fsharepoint\u002fDocuments', 'SharePoint.OpenDocuments', false, 'http:\u002f\u002fsharepoint\u002f_layouts\u002f15\u002fCreateNewDocument.aspx?id=http:\u002f\u002fsharepoint\u002fDocuments\u002fForms\u002fGuidelines\u002ftemplate.dotx', true, 1, 'ms-word');SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.OK, null);"