function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Apex Code DevelopmentApex Code Development 

Unable to retrieve URL parameters in IE

Hi Folks!!!

 

I need to retrieve the channel and region parameters from the below URL in IE.

 

https://c.cs4.visual.force.com/apex/BIPL_HighProofProjectionReportExcel_v2?product=[Bacardi Apple, Bacardi Black, Bacardi Gold, Bacardi Limon, Bacardi Orange, Bacardi Razz, Bacardi Reserva, Bacardi Superior]&month=[April, May, June, July, August, September, October, November]&year=FY’11 - FY’12&channel=Civil&region=North-2

 

I used ApexPages.currentPage().getParameters().get('channel') in order to retrieve the chanel parameter from the above URL but I'm getting null value in IE and it is working fine in Mozilla Firefox.

 

Kindly suggest me a solution ASAP.

 

Thanks,

Jagadeesh K.

bob_buzzardbob_buzzard

IE may well be fussy about the embedded square brackets, commas, single quotes and spaces in your URL.  Have you tried urlencoding the paramaters before you generate the URL?

Apex Code DevelopmentApex Code Development

There are some URLs of the same kind and they are working fine except the one I have shared above.

 

I have considered all the square brackets,commas,spaces etc in the URL but could not retrieve channel and region parameters.

 

Thanks,

Jagadeesh K.

bob_buzzardbob_buzzard

Have you tried iterating the map returned via getParameters to see which parameters break it?

 

I'd still suspec the lack of url encoding - it may be that this particular URL has more non-alphanumeric characters than IE can cope with.