I am facing issues in passing the values to custom fields which are same as shown below.



I am passing them as shown below:


But when the page is loaded its displaying only one parameter. It's overriding the other Id.

How can I resolve this issue.

  • I'm afraid I don't really understand your question from what you have provided. Are you trying to pass the 18 character ID across in the URL with getParameters().put() - and it's not doing so? Or are you having problems storing 15 character IDs in (String?) fields in an object, or ..? Commented Feb 11, 2014 at 9:54
  • I am passing the 2 field IDs in URL to a standard page using PageRef.getParameters().put() method. The issue here is that the map is not case sensitive. It is displaying only one out of the 2 IDs in the URL. Hope this helps. Commented Feb 11, 2014 at 14:40
  • You definitely have two different identifiers for your URL parameters (System.Label.abc) ? Do they appear in the URL bar as different IDs? String Map keys are case sensitive (see the bottom of this page salesforce.com/us/developer/docs/apexcode/Content/…) Maybe it would be useful to see the code that is consuming the URL parameters and putting them in the map? Commented Feb 11, 2014 at 14:55
  • Only one id is getting added to the URL parameters.I fixed it by creating a URL with these parameters in the controller.Thanks for looking into it.I will try to figure out why its not working with the PageRef.getParameters().put() method. Commented Feb 11, 2014 at 15:35

1 Answer 1


The solution here if you must use an id in your querysting is to use the 18-digit case-insensitive Salesforce Id rather than the 15-digit case sensitive version. Here is a utility method for getting an 18-digit Id in apex:

  • i tested it by passing 18 digit ids of both of them but it didnt work..I added it in the URL directly Commented Feb 10, 2014 at 18:36
  • Further information on 15/18 character ID fields can be found in this blog post: srlawr.blogspot.co.uk/2012/09/… If that is of any use? Commented Feb 11, 2014 at 9:55
  • I am passing the 2 field IDs in URL to a standard page using PageRef.getParameters().put(); Commented Feb 11, 2014 at 14:28

You must log in to answer this question.

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