You need to sign in to do that
Don't have an account?

What does it mean?
hi all.
Might be a silly question.. what does that idlist contains? all the records rec,rec1,rec2?
Record__c rec= new Record__c(contid__c=con.id,accid__c=acc1.id);
insert coinfo;
Record__c rec1= new Record__c(contid__c=con.id,accid__c=acc1.id);
insert coinfo;
Record__c rec2= new Record__c(contid__c=con.id,accid__c=acc1.id);
insert coinfo;
string idlist =rec.id+','+rec1.id+','+rec2.id;
ApexPages.currentPage().getParameters().put('recordid', idlist);
Hi,
Idlist contains of combination of unique Id of That three records(rec, rec1, rec2) which you have inserted.
Thank You,
Hitesh Patel
SFDC Certified Developer & Administrator
My Blog:- http://mrjavascript.blogspot.in/
It contains a list of the IDs of the 3 records separated by a comma.
For example:
5003000000R2uGA,5003000000R2dse,5003000000R2fOa
Thanku !
idlist is a comma delimited String. It is not a list.
The person who wrote this code is going to the trouble to do this because they are intending to pass many ID values over the URL in a manner that is acceptable to HTTP. HTTP does not support a List type construct, so they are serializing these into a string and assigning that comma delimited string to a url parameter. This would mean that the following would be appended onto the URL:
?recordid=a01000000000001,a01000000000001,a01000000000001
On the receiving end of this request, you could then use a string split method call either in Javascript or in Apex to unmarshal this back into a list and work the the passed values.
In the context of Visualforce, this may or may not be a safe way to approach the process of passing ids between two pages. If they share a controller, you can use the ViewState to encode these URLs and pass them securely in the HTTPS body, instead of the unencrypted URL portion of the request.
it means that you are inserting three records and then after it you are concatinating ids of these three records and passing in to URL for one parameter "recordid"