+ Start a Discussion

Passing set of record id to controller other than URL



I want to pass selected record ids from custom list button to controller directly without passing through URL.


Because passing through URL giving error because IE URL can contain maxm 2047 characters and i have to use Internet explorer only for my work.


Can anyone please suggest any solution for this.I am redirecting to visualforce page and a controller is wriiten for that visualforce page.


Below is my custom button code:



var records={!GETRECORDIDS($ObjectType.Area_Support__c )};

if(records[0]==null) {

alert("Please select atleast one record.");

} else {
var flag = false;

var psrecords=sforce.connection.retrieve("Id,Status__c,SAP_Transfer__c,Support_Type__c,Archieved__c","Area_Support__c", [records])

for(var i=0; i<psrecords.length; i++){

var recordId =psrecords [i];
var Arch=recordId.Archieved__c;
flag = true;
alert("You Can not do Mass change for Archived Area support!!");
}else if(recordId.Status__c != 'Approved' &&Arch!='true'){
flag = true;
alert("Mass Change can be done only for Approved Area Supports");

}else if(recordId.Support_Type__c=='Rebate' && recordId.Status__c == 'Approved' && recordId.SAP_Transfer__c=='Open' &&Arch!='true'){
flag = true;
alert('Support # '+recordId.Support_ID__c+' is currently being transferred to SAP, therefore you cannot do a Mass Change now.');

if( flag == false){




Thanks in advance:)))