I have implemented URL Hacking for Opportunity Object on New Opportunity creation from Account record(to pre-populate 'Opportunity Name' standard field with 'Account Name'). We actually have 3 Record Types on Account and URL hack works for only one Record Type, for other 2 Record Types, it's not pre-populating 'Opportunity Name'.(opp4 is working, opp3 is not)


  • Which field is not working? opp3 or opp4? Commented Feb 21, 2017 at 15:18
  • Question updated.
    – Amulya
    Commented Feb 21, 2017 at 15:22
  • 1
    Do the users where it's not working have permissions to use the record type?
    – crmprogdev
    Commented Feb 21, 2017 at 15:26
  • 1
    I just tried your use case and it's working for me. Are you sure you are calling the right button from the other record types? Because when you create a new record type of Account, you have to choose which page layout you want to apply. Commented Feb 21, 2017 at 15:31
  • 1
    No problem. That was just an error of inattention. You can answer your own question if you want. Commented Feb 21, 2017 at 15:41

2 Answers 2


FYI, you need to url encode the account name field because if there is a space in the name the link will not work and you'll be debugging forever before you realize it. This post has some good thoughts on how to do it. Proper urlencoding of spaces in formulas syntax

  • For now, it's working even for Account Names with spaces. And in that link I read that, 'Salesforce URL Encodes the final output from the custom link'. So is it still required to explicitly URLEncode it? (The link encoding is set to 'UTF-8)
    – Amulya
    Commented Feb 21, 2017 at 16:10
  • When I've done URL hack links in the past I've been burned a couple of times where a space in the name breaks the link. I so I wanted to let you know through my experiences, it's tough to troubleshoot because I would not think about it looking at everything else to see why the field is not populated. In this case I would do a test with a space in the name. Opp3 would get populated but opp4 shouldn't. Commented Feb 21, 2017 at 16:19
  • Thanks for the heads-up. I will consider this point. And fyi, when I did testing with Account names with Spaces, it's working fine for both oop3 & opp4.
    – Amulya
    Commented Feb 21, 2017 at 16:47

The issue is fixed after changing 'New' button mapping in all the associated page layouts of all Record Types.!!

You must log in to answer this question.

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