3

I am attempting to create a new custom button on the Account Page, Contracts related list, that creates a new contract for a specific Contract record type, and prepopuates the Account ID and address information. Here is what I have, but it's not working:

https://na4.salesforce.com/800/e?0016000000UbutN={!Account.Name}&RecordType=01260000000Q5pi& etURL=%2Fp%2Fsetup%2Flayout%2FLayoutFieldList%3Ftype%3DAccount%26setupid%3DAccountFields&setupid=AccountFields

  • 2
    Anything specifically that isn't working (you can update the question info) ? – Samuel De Rycke Dec 20 '13 at 22:47
1

when I build buttons like this I usually go to a record and uses the standard new button on the related list, select the record type and on the edit page I look at what I can find in the URL.

This is what I found (you will need to change the Id for the RecordType):

/800/e?retURL=%2F001U000000iFjw3&accid=001U000000iFjw3&RecordType=012U00000009ZJ0&ent=Contract

For this object you should use the ID of the account and populate the accid. It's also a good idea to update the retURL parameter so that we are returned to the right account after edit.

/800/e?retURL=%2F{!Account.Id}&accid={!Account.Id}&RecordType=012U00000009ZJ0&ent=Contract

Don't use a absolute URL but instead a relative since otherwise you will run into trouble when you do sandbox refreshes or if Salesforce is moving your instance to another domain.

My experience is that the address fields are automatically populated when you supply an account.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.