Skip to main content
In an effort to reduce clicks for my users, I want to create a new Opportunity button from a custom object we have that is REQUIRED before the Opportunity can be created. 

 

The URL I have for my Related List button on Opportunity (in Sandbox) is:

 

<ORG INFO ELIMINATED>

 

/e?Show__c={!Show_Occurrence__c.ShowId__c}&Show_Occurrences__c={!Show_Occurrence__c.Id}&Venue__c={!Show_Occurrence__c.VenueId__c}

 

The Show, Show Occurrence, & Venue all "live" on the Show Occurrence Object where this button will be. When I demo the button, I see the correct IDs pulling through in the URL of the new Opportunity edit screen, but there is no text in the field boxes & the Opportunity will not save saying the fields are blank.

 

I'm obviously missing something here, but the few tutorials I've found on buttons haven't seemed to explain this.

 

Help? Thanks!
8 answers
  1. Nov 25, 2013, 7:54 PM
    From the looks of it you are using the API field names to populate the data when you need to be using the HTML references. If you go to a new empty Opportunity page, right click and view source (it may be worded a little different based on your browser). When the source code is open you need to find the fields you are looking for and pull in their id in. For example the field on an Opportunity labeled Amount (in a standard org) is called opp7 in the HTML. So in your URL if you wanted to pass a value of $10,000 you would do /006/e?opp7=10000.

     

    Also keep in mind that inside of your org you can use relative URL's so the system will assume you want to use an internal URL so you don't need the http://server.salesforce/com you can start your custom buttons with the /objectID and go from there.

     

    Hope that helps, let me know if you have any other questions.
0/9000