5

I'm doing some field pre-population, and wanted to know the common URL parameters, and to use them.

Some of the ones I'm aware of are:

  • nooverride
  • retURL
  • save_new
  • sfdc.override

What are some others, how do you use these params, and best practices?

2 Answers 2

7

I can think of couple more (shouldn't this be a kind of community wiki question?). Roughly speaking just peek at the names of buttons you want to "hack" and experiment. For example I've found couple more params around reporting that way.

Having said that it's hardly an API, SF can change it anytime they want so be warned ;)

"Normal" forms

  • save=1 will try the form submission (usually it just saves the record but you can also use it on emailAuthor.jsp for example to immediately fire the email without user interaction).
  • new_template=1 is another useful trick for emailAuthor.jsp. Usually if you have a template with attachments the url prepopulation trick will merge only the email body. There will be no attachments. This param kind of forces to load the template correctly.

Reports

  • someReportId?delrep=1 will attempt to delete this report. It'll still fail if it's used as data source for dashboards for example. Might be useful if you don't have time for destructive deployment from Force IDE / Mig. Tool... I had to delete few thousands of stale reports (not run for over 13 months) and it'd take me forever to download them all in 5,000 chunks to the IDE, then make a destructive deployment... Small script to click through list of links and manually clean up the failed deletes ;)
  • excel=1, details=no, xf=csv etc. can be useful too (see Scheduled reports as attachment for sample usage)
  • and of course pv0 etc to pass filter values at runtime
2
  • Any reference to a list of URL parameter? That would be useful.
    – MnZ
    Jul 21, 2014 at 4:32
  • @MnZ I don't think there's an official list. Stuff like URL hacking is not an officially supported API and they try to not encourage us any further. Roughly speaking just inspect name attribute of buttons or input fields.
    – eyescream
    Jul 21, 2014 at 6:14
9

nooverride=1 is used when you're overriding a standard salesforce page with a custom vf page, but may want to redirect to the standard salesforce page in certain conditions. Setting nooverride=1 redirects to the requested page, without redirect.

retURL is the URL that the user is returned to if he/she clicks cancel.

saveURL is the URL that the user is sent to after clicking save

sfdc.override is usually set by salesforce, when you have overridden a standard page with a visualforce page.

There is also the magical service console parameter isdtp

isdtp=vw strips out the sidebard and header and is used when components are being rendered in the service cloud console.

2
  • This is exactly what I'm looking for @techTrekker. Thank you Can you talk about default values and best practices? Apr 30, 2013 at 21:19
  • There's no best practice as such, their use is dependent on the context. Apr 30, 2013 at 21:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .