I am using a List custom button in Listview once I select the records through checkboxes then the script will call and get the list of id's and pass them to apex class methods, but at that point I am getting not the id's.
var records = {!GETRECORDIDS($ObjectType.Sample__c)};
var prodRecorIds= "";
if (records[0] == null) {
alert("You have not selected any record.");
} else {
for (i = 0; i < records.length; i++) {
prodRecorIds += records[i] + ",";
}
}
sforce.apex.execute("ListviewController","updateEuro",{prodids:"{+ prodRecorIds}"});
window.location.reload();
I am passing the list of id's in +prodRecorIds in execute method, but I didn't get the id. Instead of ids it passes the 'prodRecorIds'
string. How can I resolve this issues?