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
Neha Ghosh 24Neha Ghosh 24 

Prefill contact name based on id for a custom button

I'm trying to add a custom button to the Contact object that is associated to a child object. This button is called "request item" which opens to the edit screen of this new object to create a new record. Right now the user has to put the contact in again, which is uncessary. I want the contact to be filled out automatically based on the contact they were on.

This is my button code right now. 

/a5V/e?00NC0000007IvpQ={!Contact.Name}&00NC0000007IvpQ__lkid={!Contact.Id} 
&retURL=%2F003C0000028iu2c

Please help!
SandhyaSandhya (Salesforce Developers) 
Hi,

Try below code
 
/a5V/e?00NC0000007IvpQ={!Contact.Name}&00NC0000007IvpQ__lkid={!Contact.Id} 
&retURL=%2F{!Contact.Id}&name=default

https://developer.salesforce.com/forums/?id=906F00000008ocDIAQ
 
https://success.salesforce.com/answers?id=9063A000000lEyEQAU
 
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
                                             
Best Regards
Sandhya