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
Gauri Kasat 8Gauri Kasat 8 

How to add new lead to related list of custom object?

Hello,
i have overridden new button of lead object.
My requirement is to add lead object to the related list of the custom object "journey".

I have created a lookup field called Journey id on lead.

I have created a vf page to override new button and create the commandbutton save.
after clicking on the save button it will 1st call to the javascript function which will capture the location and after that save method.
the javascript function capture the location and creates a object for journey. 

in action part of commandbutton i have called the save method.


If anyone have solution please do tell..
NagendraNagendra (Salesforce Developers) 
Hi Gauri,

May I request you please elaborate your requirement so that we can understand better and can help you accordingly.

Also, would you confirm where exactly you want to display the lead related list.

Happy to help further.

Thanks,
Nagendra
Gauri Kasat 8Gauri Kasat 8

Hey Nagendra..

I need to display lead related list in "Journey Object".