You need to sign in to do that
Don't have an account?
rossco
Custom Button URL and related record values
Hi
I have a custom object A that has a lookup to an Opportunity via field B. That opportunity has a custom field called C that is a lookup to Contact. I now want to put a custom button on object A that passes the value of the contact id (on the opportunity) to an apex page. How do I specify this in the Custom Button URL?
Thanks
Ross
Hi,
I have created a custom object with the lookup field opportunity. I have also created a lookup field in opportunity object with contact object.
After that create a formula field “testfield “ name in custom object with text type with following formula.
fieldB__r.Fieldc__c
Now create a custom button in custom object with following
Content Source=URL
/apex/pagename?id= testfield__c
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
All Answers
Hi,
I have created a custom object with the lookup field opportunity. I have also created a lookup field in opportunity object with contact object.
After that create a formula field “testfield “ name in custom object with text type with following formula.
fieldB__r.Fieldc__c
Now create a custom button in custom object with following
Content Source=URL
/apex/pagename?id= testfield__c
Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.
Just to add to Navatar's solution, I would change the URL definition to
../apex/pagename?id= testfield__c
The ".." will pass the server name; and if you have a page controller, or if other things are going on (like a page redirect) it will make it easier to get the host name.
Would you mind assisting me in connecting 2 objects (Leads - Projects) with the convert button? I created two objects and I need one to convert into another. The code that I wrote is not working properly. Thank you in advance.