You need to sign in to do that
Don't have an account?
Ken A
Overriding Save button
Does anyone know how to override the "save" button for custom objects? I want to go to another SF webpage after completing a object insert. The only override I see is the "Accept" button, but it doesn't appear to be the "Save" button. Perhaps this is not possible because then it wouldn't be possible to insert the record into the DB.
So if this is the case does anyone know how to accomplish this:
I have two tables
Orders
Order Items
User adds an item: Currently when the item page "save" is it it goes to the completed item...instead I want to have it go back to the "Orders" page.
Any help with be much appreciated.
/{!Case.Id}/e?saveURL=%2FsomeOtherObject
The saveURL has to be url encoded (hence the %2F I put in there). This one obviously won't go anywhere, it's just an example.
At the moment, I don't see how it could, particularly if the Case has required fields. I was thinking of including a function that creates a new Case, and then passes that Id along so that your syntax would end up looking more like:
(imagine code here to create a var newCaseId, create a new SObject Case, and then assign the resulting Id to newCaseId
/{!newCaseId}/e?saveURL=%2FsomeOtherLocation
But if there are required fields, then the new Case wouldn't be created until we added default values (or inserted temporary ones) that would have to be changed on the Edit page.
Please correct me if I'm wrong, and thanks!
A trigger can help you here. Have the trigger fire ON INSERT on the case object. It can return error messages to the user's screen (so they can fix whatever's missing and save again), as well as perform lots of other tasks.
So, override the new button to get started. But don't be surprised if some cases appear in your system which never called your special code! I think only a trigger will ensure that your logic will be applied, no matter how the case is created.
Message Edited by Kirk F on 01-12-2009 11:51 AM
Hi Could plz send me ,an example for saveURL and tell me how its redirecting to another url ?
thanks in advance
Search "saveurl" in the search box at the top of these forums, you'll find tons of examples.