Domanda

I have a user that wants the page to automatically go to the display page of an item that he just created. I want to be able to do this using a Content Editor Webpart using JavaScript that is placed on the list display page.

if(url = newItemURL){
window.location = newItemDisplayURL;
}

The problem I'm having is getting the display url for the newly created item. I could use the ID, but with just JavaScript I'd have to count elements and it gets messy if the user deletes an item. JavaScript is preferred because of organizational limitations, though other languages can be considered.

È stato utile?

Soluzione

This isn't possible in SharePoint 2007 as you'll have to get this after the item creation, meaning after a PostBack is triggered. This of course reloads the page, erasing any track of the "old" page session.

You'll have to create an evenreceiver which redirects the user when the item is created.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top