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
Sapana WSapana W 

Refer parent name in url for custom button

Hi,

I want to create a custom button on parent record to add records in child object. I created the custom button with url for new child record on parent object but the parent name does not auto populate in the new child record edit mode and I have to enter it manually and then save the record. Is their a way to get this working.
K_McRaeK_McRae
This might help:
http://sfdcwizards.com/archives/47/automatic-record-type-selection/
RAJ TRRAJ TR
Hello,
Pass the Parent id in the URL and then get the id in vf page, Just assign the parent id to look up field in Constructor. Then i will populate the Parent name.

Thanks 
Rajesh
SKolakanSKolakan
You can use this

/a06/e?CF00NF000000CewM5={!Parent__c.Name}&CF00NF000000CewM5_lkid={!Parent__c.Id}&retURL=%2F{!Parent__c.Id}

Where 
a06 = entity Id ( change this to your child entity Id. you can see that when you are on that object list or detail page url)
CF00NF000000CewM5 = field Id ( Change this to field id of the parent on child record. you can get this by inspecting(using developer tools in your browser) parent field while creating child record)