I have a custom button in my org that, when clicked, brings the user into an external application. That external application sends an email to other users with a link to the URL of that custom button via /servlet/servlet.Integration?lid={myButtonId}.

Is it possible to provide a parameter to this custom button?

To clarify, the custom button would look something like:


So, within the email, I want to provide a link to the button that passes in someExternalValue:


Thus, when the user clicks the link, Salesforce launches straight to the URL of the custom button, and the value "abc" is passed in, so the resulting URL salesforce opens is myExternalApp.com/view?id=abc

Can this be accomplished somehow?

EDIT: As @Ralph states below, this does not seem to be possible. As a workaround for my use case, I created a visualforce page with an iframe tag which loads the same URL as the custom button, making it easy to pass the extra parameter to the page. This isn't ideal since I now have to maintain two components, but it gets the job done.

1 Answer 1


No, you can't do this with a custom button. Custom buttons are not intended to be used as links and probably won't work at all. The links from the custom buttons are the result of a post and just copying the link will lose other information that is passed a long with the button click.

Depending on your use case it sounds like you'll need a visualforce page. You're external system would send users a link to the visualforce page with whatever parameters you need to process on the salesforce side. Unfortunately, your use case sounds a little unusual and it may be better to ask a separate question about your specific use case rather than the more general can I pass in parameter question.

Note however, that if you want to pass in attributes from a salesforce record to the url resulting from a custom button this is easily done by editing the content source of a custom button.

  • This doesn't solve the problem. The value {!someExternalValue} is entirely external to salesforce, that's the problem. I'm looking for a way to pass it into the custom button, so the resulting URL will contain that external value. The source of someExternalValue is the email generated by the external system.
    – CDelaney
    Jan 21, 2014 at 20:07
  • Updated the answer, long story short, custom buttons aren't what you want. Using them as links is going to have multiple issues beyond just the inability to pass in parameters. I'd suggest reposting this as a seperate question with more specifics of your use case (that'll get you more attention then editing this one) Jan 21, 2014 at 20:52

You must log in to answer this question.

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