2

I'm leveraging a Visualforce based Community that is mobile-optimized and noticing that when I provide a link to the User Profile page, Salesforce is attempting to open the Salesforce1 app (if not installed, throws and error and then continues to the web view). This doesn't happen when opening standard VF pages.

I'm curious if anyone has experienced this and has any idea how to prevent this behavior, as I'd prefer not to launch the Salesforce1 app a user might have installed for their actual company from within a Community (and point them to a non-existent record). I've turned off Salesforce1 User on the User's metadata, but based on the executing javascript it seems like that is ignored. I can't turn of Salesforce1 as a whole because internal users need it - I only want to stop Community users from being redirected.

SfdcApp.IosRouting.LaunchPage = new function() {
       function launchMobileApp() {
           var launcher = new SfdcApp.IosRouting.Launcher();
           launcher.launch('com.salesforce.chatter://chatter/profile?s1oid=xxxx....', 'https://myorg.force.com/mypage');
       }

       Sfdc.Dom.onload(launchMobileApp());
};

If the Salesforce1 app is not installed, it continues to the desired page, but appends the following URL parameters:

iosri=[long numerical value]&iospref=web

I might be able to try and append iospref=web to every standard Salesforce link when clicked but it seems like there should be a way with less hacking. I'm also not sure if there are any negative ramifications to doing that (on desktop, android, etc.).

A similar question is posted here, but without any real answers: Salesforce1 Redirection Issue from Mobile Web Browser

UPDATE 1: We made an attempt to append iospref=web to standard links when on a mobile device, which works for most standard pages. However things like File links undermine that since the standard link (on a profile, Files page, etc.) references a document version, which then redirects to the ID of the document (which we can't intercept without doing work to resolve those and modify a standard page).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.