You need to sign in to do that
Don't have an account?
vivek somani 1
Redirect To vf page on mobile card click ?
In salesforce1, on mobile card click it opens the same vf page in full mode.
But if i want to open some other vf page on mobile card click is there any way to do this ??
Can i do this using javascript somehow ??
But if i want to open some other vf page on mobile card click is there any way to do this ??
Can i do this using javascript somehow ??
I have a "preview" Vf page defined to be displayed as the Mobile Card and set it to a 100px height from the Page Layout. This contains just an icon and some preview text in my case. At the bottom of this preview page I have some JavaScript checking the window height. If the window is greater than the 100px I defined for the Mobile Card, then I redirect to my second Vf page containing my intended functionality.
When you first swipe to view the Mobile Card this JavaScript does nothing because it's confined to the 100px height. When you click on the prevew it will open the page in full screen and then automatically redirect to the second page since the height is now greater than 100px. This results in a quick flash of the preview page, but this is acceptable for me instead of needing to do a second click for navigation.
So at the bottom of my preview page I used the following:
<script>
function checkSize() {
var myHeight = 0;
if( typeof(window.innerHeight) == 'number' ) {
myHeight = window.innerHeight;
}
if( myHeight > 100 ) {
sforce.one.navigateToURL('/apex/someValidPageName');
}
}
checkSize();
</script>
I appreciate any input on the pros/cons of this method, but so far I have been using it without an issue.
I'll try to use your workaround.
@bob any news about this topic?
Davide