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
Sumit Kumar 42Sumit Kumar 42 

Acount detail page related question

Hi, I am new to salesforce and i have some question how do we acheive this in salesforce.

Let's say you are on Account detail page its Account name is xyz and i want to add Contact in its related list then i click new from Account detail page it redirects me to Contact detail page now when i add and save it, it redirect me to Contact detail page. But i want when i save Contact it should be added in the Account detail page and the Account detail page should come not Contact detail page.

Please help me how do i acheive this. please follow this link what i would like to say: http://quickst.ps/sf
Vi$hVi$h
Hi Sumit, 

You will need to create a new custom button on Contact object.
1. Create a custom button of display type List bustton
2.  Behaviour : "Display in existing window without sidebar or header"
3. Content source : URL
4. Using Select Field type & insert field, create the following URL
/003/e?retURL=%2F{!Account.Id}&accid={!Account.Id}&saveURL=%2F{!Account.Id}
this URL is similar to the URL created on clicking on standard new button for contact from Account.
saveURL=%2F{!Account.Id} -- due to this parameter on saving contact it will be redirected to account.
retURL=%2F{!Account.Id} - redirects to account on cancel.

Thanks,
Vishal
If the reply was useful and solved your problem then please mark it as best answer.