Hi Ankur ,

 

I have tried the code but it is not working like exactly what i told in screenshot1 you can see that in To it attaching the ritm sys_id . my requirement is in To field it will selected ritm.requested_for and in number it will store ritm number working as expected 

script modified:

function sendCustomEmail() {
var sysIds = g_list.getChecked().toString();
var requested_for = [];
for(i=0;i<sysIds.length;i++){
var gr = new GlideRecord("sc_req_item");
if(gr.get(sysIds[i].toString())){
requested_for.push(gr.request.requested_for.toString());
}
//gs.addInfoMessage("EmailClient " + requested_for);
}

var url = '/sc_task.do?sys_id=-1&sysparm_query=u_number=' + sysIds + '^u_to_whom=' + requested_for;
top.location.href = url;

}