I want to open a popup window (Window is not a vf page) with select list values to give input and create record using given input values total functionality to be done by using custom button onclick javascript. I have to write code in bellow shown box..
Example code:
{!REQUIRESCRIPT("/soap/ajax/33.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/33.0/apex.js")}
var accnt = new sforce.SObject("Account");
accnt.Name = prompt('Enter new Account Name','{!Account.Name}'); var result = sforce.connection.update([accnt]);
if(result[0].getBoolean("success"))
{ alert('Account updated successfully');
window.location.reload();
}
else{
alert('Error : '+result);
}
By using above code as reference, I think you will be able to create record through java script