fetching record id passed through url in edit view


i have created a custom button ‘create note’ in list view of leads. An extra column of create note appears as shown below in link(image).
through that ‘create note’ button i am sending the lead id as record in url as - http://localhost/cod/suitecrm/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DNotes%26action%3DEditView%26return_module%3DNotes%26return_action%3DDetailView%26record%3Da0deb972-35e7-d909-41be-5be96467233c.

after clicking on the create note button i want to fetch that record id and want to autofill the related field lead using that record lead id in create note.
i want the same functionality that appears after opening a lead below the history tab create note with autofill related lead name on list view of lead using that button ‘create note’ in list view

kindly help
links for images below:



What about creating global variables instead:


Are you trying to do it with javascript or php?
I think that it would be simpler to integrate it in the code that generated the button.

If you share it I can try to give you a hand. It shouldn’t be too difficult.