Hi Ravi,
I made this code, and doesn't do anything when I create a new contact, I load it onLoad form of Quick Contact, sorry I new on JS
"new_contacto" is the lookup field of Contact on the main form, in this field is where I search the name and last name.
"new_primernombre" is the field in Contacts entity where I want to paste the "First Name" value.
"new_primeapellido" is the field in Contacts entity where I want to paste the "First of Last Name" value
function loadsearchResults() {
try {
var searchResults = window.top.frames[0].Xrm.Page.getAttribute("new_contacto").getValue();
var searchName = searchResults.split(" ");
Xrm.Page.getAttribute("new_primernombre").setValue(searchName[0]);
Xrm.Page.getAttribute("new_primerapellido").setValue(searchName[1]);
}
catch (err) {
console.log(err.message);
}
}


Thanks