I have a lookup field in standard page. when I click on a custom button in other page need to pass the default value for lookup field in my standard page. If I pass some field id and values in url seems it work anybody have working example. Also is this approach reliable?
1 Answer
For that you need to use so-called LKID hack
or in other words URL hacking
. There are many infos about it and even an idea on IdeaExchange: Replace the lkid hack
The workarounf is that you need to know the field ID you want to pre-populate and use this id in the URL string in the link on your corresponding visualforce page.
Take a look at this tutorial for understanding the workaround:
Salesforce URL Hacking to Prepopulate Fields on a Standard Page Layout
Some info about LKID at the Stackexchange Salesforce forum:
What does the 'lkid' URL parameter mean?