2

Have Got a junction object between Contact and Address(Custom object). The name of Junction object is ContactAddress.

I have created a Related List Button New Address on ContactAddress. When I click on New Address from the Related list in Contact Page, is there a way i can popluate the Contact name on any of the custom fields inside Address object.

I was trying this through Salesforce URL hacking, but for that there should be a relationship between (Contact and Address), but there is currently no direct relationship between them other than through the Junction object named ContactAddress.

Can you help with examples

1

As i understand you create button with link to Address New page. For populate contact info inside some field in address you must know field Id where you want put value. You can find this Id in HTML of standard New Page. For example I create field with name test. Id of this field = 00Ni000000G1pjT

<input id="00Ni000000G1pjT" maxlength="150" name="00Ni000000G1pjT" size="20" tabindex="2" type="text" value="test">

after that i want populate Contact FirstName in this field. My link in button must look like this:

/a0g/e?00Ni000000G1pjT={!Contact.FirstName }
1

Create Custom button on ContactAddress of type List Button. and try to add code in following format.

/first 3 letters of record id of ContactAddress/e?FieldID1={!Account.Name} & FieldID1_lkid={!Account.Id} & FieldID2="value"

FieldID1 is the id of field on contactAddress.

FieldID1_lkid is used to populate lookup fields.

FieldID2 is any other field on ContactAddress whose value is to be set.

  • Wow Anita, thanks a lot. Is it possible to change the name of the related list, For example if I want to change the ContactAddress name to Contact on Contact page and rename it to Address on Address Page – user18187 Apr 16 '15 at 16:25
0

With same scenario I could get information via URL button and merge fields.

Create button in your junction object with type as URL

sample:

/006/e?retURL={!Contact.Id}&name={!Contact.Name}

You are done!!! This will work in contact detail page.

  • 1
    Thanks a lot Pradeep,it worked great. Is it possible to change the name of the related list, For example if I want to change the ContactAddress name to Contact on Contact page and rename it to Address on Address Page – user18187 Apr 16 '15 at 16:23

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.