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
NevDevNevDev 

How to pre populate lookup fields in a custom child record

I would like to automatially populate lookup fields on the child object which reflect the same lookup values of the parent object (Opportunity object).
How can I achieve this? I have looked into this and I have found a link below which is helpful to a point, it only shows how to auto populate a text field but not a lookup field.

http://raydehler.com/cloud/clod/salesforce-url-hacking-to-prepopulate-fields-on-a-standard-page-layout.html
NevDevNevDev
I should add that there is an extra layer of complexity to this. The custom object Payments__c has 3 record types.
NevDevNevDev
This is the URL of the edit page of one of the custom related child object record types.

https://companyname.com/a00/e?CF00N0Y00000KLs7G=New+lease+Test&CF00N0Y00000KLs7G_lkid=0060Y00000ASMGX&retURL=%2F0060Y00000ASMGX&RecordType=0120Y000000kd7t&ent=01I0Y000000laan
Chellappa NagarajanChellappa Nagarajan
Hi NevDev,
Have you taken a look at the below articles. It might help you.

https://salesforce.stackexchange.com/questions/937/how-do-i-prepopulate-fields-on-a-standard-layout
https://salesforce.stackexchange.com/questions/111315/parent-fields-pre-populate-after-selection-of-related-object-record-type

Note: I haven't done this by myself. 

Thanks,
Chellappa