This project has moved. For the latest updates, please go here.

Is there such a thing as PostSaveItem or its equivalent?

Jul 29, 2014 at 1:21 PM
I've created a PreSaveItem() function to do a bit of pre-processing on the default create/edit form for a document library which works just fine. But is there a post-save equivalent? I need to create a link to the properties page of the newly created entry in the document library without a lot of mucking around like creating my own version of the default forms. Ideally I'd like to get the list ID # (ows_ID) so I can construct the URL link to use DispForm.aspx which will be inserted in another list's column after the new document is successfully saved in the library (which means I don't want to do this additional processing if the user cancels the create document transaction).

Thanks in advance.
Aug 2, 2014 at 5:18 AM
Quick answer: no. But have you looked at SPRedirectWithID?

Aug 4, 2014 at 6:18 PM
I had a similar need with a recent project. What I ended up doing was creating a custom Save button that did a commit with a redirect. The redirect sent the user to a second modal dialog that ran my code and then closed. I passed the item ID in the URL when doing the redirect.