+ Start a Discussion
emlizmueemlizmue 

Trouble with a custom button

Wondering if I could get some help troubleshooting a custom button that I can't get to work.  We have a new custom object called Payments where the standard 'new' button takes you to :

 

https://na5.salesforce.com/a08/e?CF00N70000002OqvH=TEST+TEST&CF00N70000002OqvH_lkid=0037000000mcUVY&retURL=%2F0037000000mcUVY

 

Where

CF00N70000002OqvH=TEST+TEST puts the contact name in the Contact field

and

&CF00N70000002OqvH_lkid=0037000000mcUVY looks up the Contact ID

 

We want to also have the button attach this record to the Account lookup as well as fill in the Payment Name field with the Contact Name.

 

I created a New Payments button link that looks like this:

 

a08/e?CF00N70000002OqvH={!Contact.Contact_Full_Name__c}&CF00N70000002OqvH_lkid={!Contact.Id}& CF00N70000002P4rP={!Account.Name}& CF00N70000002P4rP_lkid={!Account.Id}&CF 01I700000003G2z={!Contact.Contact_Full_Name__c}&retURL={!Payments__c.Id}

 

I looked up the field references by looking at the links to these fields on the Object detail page and they look like 00N70000002P4rP.  I put in the CF prefix because that's what the standard New button was doing. 

 

Am I totally off track or is this fix-able?  Any help appreciated, thanks.

kyle.tkyle.t

In order to get the id of the field, try viewing the page source of the edit page IE View>source, firefox, View>PageSource.

 

Search for the label for the field you are concerned with and find the id="00N... in the code.  I believe that is what you need.

SFDC_ReservoirSFDC_Reservoir

What I feel is you are populating the Account lookup field with Account Name and then with Accound ID. Just populate the lookup with ID only.