1

The issue is on iPad.

I have a tab in community, and on click we change the users language (call the controller using JS Remoting). On Success we are trying to go back to the page we were previously on.

ex: Page1 -> Page2 -> click language tab -------> change users language and go back to Page2, which is translated.

This functionality works fine in Chrome, but not in Safari. I am using the below two lines on success

Visualforce.remoting.Manager.invokeAction('{!$RemoteAction.LangToggleController.updateUser}',
    function(result, event){
         if(event.status){
         if ( (typeof sforce != 'undefined') && sforce && (!!sforce.one) ) {
           sforce.one.back(true);
           window.top.location.reload();
         }else{
            window.history.go(-1);
          }
        } else if (event.type === 'exception'){
           alert('Callout error: ' + event.message);
        } else {
        }
    }, 
    {escape: true}
    );
3
  • In what way is this not working? Is it not behaving as expected? Are you getting an error? Mar 7, 2017 at 13:15
  • This is not working as expected in Safari . It works perfectly fine in chrome; It goes back to the page when the language toggle was clicked. the entire community reloads with the translated language and the navigation menu is also translated. Mar 9, 2017 at 5:42
  • There is no error in Safari. It does not load the community with the translated language and "sforce.one.back(true);" takes it two pages back. Mar 9, 2017 at 14:36

0

You must log in to answer this question.

Browse other questions tagged .