function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Krzysztof NowackiKrzysztof Nowacki 

Custom button to populate primary campain source from contact to Opp

Hi,
I want to pass (in custom button) primary campaign from contact to Opp while creating Opp. Got some url code but the part opp17 is not working. Any ideas? 

/006/e?retURL=/{!Account.Id}&accid={!Account.Id}&RecordType=012110000004&ent=Opportunity
&opp17_lkid={!CampaignMember.ContactId}}&opp17={! CampaignMember.Campaign }
ManojjenaManojjena
Hi Krzysztof,

Check the campaign field id in Opportunity new page . Right click on the field and select inspect element .and copy the field id like below .
http://raydehler.com/cloud/clod/salesforce-url-hacking-to-prepopulate-fields-on-a-standard-page-layout.html

Let me know any issue .
 
K_McRaeK_McRae
Krzysztof,

If the opp17 field is a customer field then you need to highlight the fact in the URL.

On the SFDC Wizards blog (http://sfdcwizards.com/) there is an article called Automatic record type selection (http://sfdcwizards.com/archives/47/automatic-record-type-selection/) that does somehting similar with a lookup field.

You need to refer to the id of the field and add "CF" at the beginning.

cheers,
Keith