You need to sign in to do that
Don't have an account?
![Finky9 Finky9](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Trouble pre-populating fields passed to custom object
I have a help request for URL merge fields on Custom Buttons (new Salesforce SFA7 release feature). I want to pass the standard Opportunity Name field to a field in a custom object. The field in the custom object is a Master-Detail Relationship field referencing the opportunity field called Opportunity Name.
I have a Custom Button (settings below) on an Opportuntity. The button launches a Custom Object called Ticket in edit mode. The button hyperlink code here works fine:
/a03/e?retURL=%2Fa03%2Fo This is the server agnostic URL of my Ticket object in edit mode
However, I want to append this to pre-populate the Ticket with the opportunity name from which it was launched. Using Firefox Web Developer extension I have determined that the field name of the Deals field on my custom Ticket object is 00n60000001uwgo. (Through trial and error I believe that custom fields have names like this and standard fields have names like opp3. Tell me if I’m wrong.) I also believe the merge field name for the opportunity name is {!Opportunity.Name}. So, the source field is {!Opportunity.Name} and target field is 00n60000001uwgo, right?
I have tried various combinations to launch the Ticket in edit mode with the Name pre-populating. None work:
/a03/e?retURL=%2Fa03%2Fo&{!Opportunity.Id}&"&00n60000001uwgo="&{!Opportunity.Name}&"
/a03/e?retURL=%2Fa03%2Fo&{!Opportunity.Id}&"&00n60000001uwgo="&{!Opportunity.Name}
/a03/e?retURL=%2Fa03%2Fo&"&00n60000001uwgo="&{!Opportunity.Name}
I’m stumped. Can anyone help me. I have a few other fields I want to pass from the Opportunity to the Ticket, but if you help me with this first field I’m sure I can figure it out
Finky
Custom Button Settings
Type: Detail Page Button, Behavior=Display in new window, Content Source=URL
&00n60000001uwgo={!Opportunity.Name}
Thanks for your thoughts. I still can't get it to work. I have a question1. How do I combine your suggested syntax:
&00n60000001uwgo={!Opportunity.Name}
with my syntax (which works properly and opens a new Ticket in Edit mode)
/a03/e?retURL=%2Fa03%2Fo
How do I put them both together?
Dave
When clicked this should direct the user to the edit page of your custom object and pre-populate the opportunity name in your custom field "00n60000001uwgo". This syntax will also allow the user to return to the Opportunity (detail page) from which the custom object edit screen was accessed upon saving or canceling.
I hope this proves helpful,