URL Hack: Pass additional parameters into the saveURL

I’m pretty good with URL hacks to set field values in a record, save=1, saveURL/retURL, etc… But I’m getting stuck on something I’ve never tried before and I don’t even know if it is possible. Is it possible to add parameters into the saveURL string?

e.g.
/id/e?field1=blah&save=1&saveURL=aDifferent.Id/e?field2=blah&field3=yada

So in other words, what I’m interested in doing is, Update a field on one record with an auto-save, then return to a related ID of a different record on the edit page (all good up to this point). However, I can only seem to pass a single field update after the ? and anything after the ?field2=blah gets dropped and the edit screen won’t show the &field3=yada update.

Ultimately, I’d also like to add in an &save=1 on the saveURL string also, so one button can modify and save one record, then modify and save another record. I’m trying to accomplish this without code if I can. Any ideas?

Answer

Easy 🙂

Just urlencode your params again. That way they’ll get decoded when SF is examining your saveURL. For example:

  1. URL to make new Task: /00T/e?tsk5=Hi%20SF%20Stack!&tsk6=Look%20Ma,%20no%20hands!
  2. Go to http://meyerweb.com/eric/tools/dencoder/ or any other tool of your choice (URLENCODE function, javascript’s encodeURIComponent… pick your poison).
  3. You should end up with something like %2F00T%2Fe%3Ftsk5%3DHi%2520SF%2520Stack!%26tsk6%3DLook%2520Ma%2C%2520no%2520hands!
  4. That’s your saveURL.

The only problem is that this seems to somehow skip the code that generated “Recent Items” in the sidebar. So after I’ve saved an Account and I eventually end up on this new Task page, I don’t see it in the sidebar. Only when I’ll navigate to any other page it pops up.

enter image description here

Attribution
Source : Link , Question Author : Jason Paquette , Answer Author : eyescream

Leave a Comment