fetch id from url

I am created one custom button in lead list page to create note.

created note can’t fetch current lead name in related field because open seperate note module

how to display current lead name in that relate to field

please help i am stuck almost 2 week

You need to give some detail of how you created this button.

You need to pass those parameters in the HTTP request, look for similar buttons in other places in SiuteCRM and copy what they do.

If you want to get help with a development issue, you will need to by MUCH more detailed than that. What does your code look like? Where is it located? Which error messages do you get?

So your button calls some code, what is that code?

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:

drive.google.com/file/d/1SPJlSSg1qDgtkJEw5NX_5ZaUTgW8T2m1/view

drive.google.com/file/d/1EQcg_TI7FgjXCHgHVK-nhmEqCxsce69q/view

i am create logic hook in lead following are the code that creation

class ViewOnNoteHook{
function addButton($focus, $event, $args){
$lead_id = $focus->id;
$loc = “index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DNotes%26action%3DEditView%26return_module%3DNotes%26return_action%3DDetailView%26record%3D$lead_id”;
$focus->create_note_button = “<button onclick=window.open(‘index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DNotes%26action%3DEditView%26return_module%3DNotes%26return_action%3DDetailView%26record%3D$lead_id’,’_blank’) type=‘button’ class=‘btn btn-danger’ value=’”.$focus->id."’>Create Note";
}

create note button display in lead list page .i am click that button open note creation form but lead subject and lead relate to blank .how to get that value in that field.