Hi All
Happy Holidays...
I do not know what is wrong with my statement below:
I get an error on Substring is not a function????
var idName = rString.substring(startingPos+6,rLength);
Basically user will select more then 2 records form the list view and then click on a custom button to insert records...
I needed to replace between the commas and place in something like this 'XXXrecordid','XXrecordid'
Thanks
Happy Holidays...
I do not know what is wrong with my statement below:
Code:
var rLength= recordIds.length;
var rString = recordIds;
var startingPos = rString.lastIndexOf("recordIds");
var idName = rString.substring(startingPos+6,rLength);
var myNewString = idName.replace(/,/gi,"','");
var strSQL="select Id, Description__c from Position__c where Id in('" + myNewString+ "')";
var idName = rString.substring(startingPos+6,rLength);
Basically user will select more then 2 records form the list view and then click on a custom button to insert records...
I needed to replace between the commas and place in something like this 'XXXrecordid','XXrecordid'
Thanks