You need to sign in to do that
Don't have an account?
ApexPages.currentPage().getUrl(); returns WRONG Url?
Hi,
I am developing an application using Flex and Salesforce. In my custom component controller I am using
ApexPages.currentPage().getUrl();
to retrieve current page url. After completing flex stuff, I am returning to the current page using this return url.
This is working in my Developer organization which has a namespace prefix.
But when my customer installs this managed package and uses this custom component inside their custom visualforce page it is appending my namespace prefix to it, instead that custom page and my customer environment does not have a namespace prefix.
So when user clicks OK button it is trying to return to https://c.na7.visual.force.com/apex/MYDEVELOPMENTNAMESPACE__MyCustomPage....
but the page stays at https://c.na7.visual.force.com/apex/MyCustomPage....
How can I solve this problem? Is there a dynamic way to solve this problem or do i need to get the url as string then split and remove namespace?
Thanks in advance,
John