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


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.
This might help:
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.

You can use this


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)