You need to sign in to do that
Don't have an account?
Chanagan Sakulteera
ApexPages CurrentPage getParameters is different in Salesforce1. How can I read the parameters?
I have an apex extension and VF page, as an override to the New link on a custom object, that does something I would think is pretty standard. For a new record, it checks the RecordType coming in from the URL and returns a different view depending on the record type. Conceptually, like
if (ApexPages.CurrentPage().getParameters().get('RecordType') = '012....')
return new PageReference('SomePage');
else return new PageReference('SomeOtherPage');
Which is fine until I put the page into Salesforce1. Because in Salesforce1, ApexPages.CurrentPage().getParameters() returns a different set of values.
In normal browser UI, the map contains
{RecordType=012i0000001AXw6, ent=01Ii0000001oJDs, retURL=/a0N/o, save_new=1, sfdc.override=1}
because it's just come off the record type selection page, so it has RecordType and ent.
When the same code runs In Salesforce1, I get the record type selection page, then I'm redirected to my VF, where the map looks a bit different:
{isdtp=p1, nonce=52409e8a3dd9f5289e71c077c88c92422940a5c34ea2585243ef3ea6119d5236, save_new=1, sfdc.override=1, sfdcIFrameOrigin=https://cs15.salesforce.com}
How can I read the URL parameters like RecordType? where are they?
Thank you in advance.
if (ApexPages.CurrentPage().getParameters().get('RecordType') = '012....')
return new PageReference('SomePage');
else return new PageReference('SomeOtherPage');
Which is fine until I put the page into Salesforce1. Because in Salesforce1, ApexPages.CurrentPage().getParameters() returns a different set of values.
In normal browser UI, the map contains
{RecordType=012i0000001AXw6, ent=01Ii0000001oJDs, retURL=/a0N/o, save_new=1, sfdc.override=1}
because it's just come off the record type selection page, so it has RecordType and ent.
When the same code runs In Salesforce1, I get the record type selection page, then I'm redirected to my VF, where the map looks a bit different:
{isdtp=p1, nonce=52409e8a3dd9f5289e71c077c88c92422940a5c34ea2585243ef3ea6119d5236, save_new=1, sfdc.override=1, sfdcIFrameOrigin=https://cs15.salesforce.com}
How can I read the URL parameters like RecordType? where are they?
Thank you in advance.
Chinmay Menon 7
@Chanagan Sakulteera, did you get a solution for this? I am facing an almost similar issue.