You need to sign in to do that
Don't have an account?
cooldamsel
VisualForce Components not loading when redirecting in Mobile devices
Hi All,
I am new in Salesforce1 App development. I have created a VisualForce page which contains map, date picker, custom visualforce components and visuaforce remoting methods. I have created a functionality which redirects to another page url using window.location.href. Then i noticed from documentations that window.location will not work in mobile devices. Then on further analysis found that we need to use sforce.one.naviagteToURL and my code is
Redirect : function ()
{
var url = '/apex/MyCustomPage';
if( (typeof sforce != 'undefined') && (sforce != null) )
{
// Salesforce1 navigation
sforce.one.navigateToURL(url);
}
else
{
// Set the windows URL
window.location.href = url;
}
}
This above code works fine in my desktop version but when i use the same in mobile device, the components like DatePicker, Custom Compoents, map inside MyCustomPage are not loaded in the page when this redirect method is called. Am breaking my heads with this. Anyone please help me out.
Thanks in Advance,
Indhu
I am new in Salesforce1 App development. I have created a VisualForce page which contains map, date picker, custom visualforce components and visuaforce remoting methods. I have created a functionality which redirects to another page url using window.location.href. Then i noticed from documentations that window.location will not work in mobile devices. Then on further analysis found that we need to use sforce.one.naviagteToURL and my code is
Redirect : function ()
{
var url = '/apex/MyCustomPage';
if( (typeof sforce != 'undefined') && (sforce != null) )
{
// Salesforce1 navigation
sforce.one.navigateToURL(url);
}
else
{
// Set the windows URL
window.location.href = url;
}
}
This above code works fine in my desktop version but when i use the same in mobile device, the components like DatePicker, Custom Compoents, map inside MyCustomPage are not loaded in the page when this redirect method is called. Am breaking my heads with this. Anyone please help me out.
Thanks in Advance,
Indhu
Please refere below code which I haev used and it was working fine for me
Please chck and let me know if it helps you
Thanks,
Sandeep
I have done the same logic in redirecting to page but you have redirected to different versions of the page. And in my scenario, the redirection works fine with the page url but if i include parameters in my url the components in the page are not loading.
Thanks,
Indhu