+ Start a Discussion
claperclaper 

sforce.one.navigateToSObject method not working

I have the following code implementation in a VF page that has been enable for SF1
function navigate(){
                
                if ( (typeof sforce != 'undefined') && (sforce != null) )  {s
                    alert('parentId  {!parentDBRF}');
                    sforce.one.navigateToSObject('{!parentDBRF}');
                } else {
                    window.location="/" + '{!parentDBRF}';
                }        
            }

the method is being called by :
<apex:ActionFunction name="addDBRFLine" action="{!addNewLine}" reRender="msgs" oncomplete="navigate();" />

The issue comes with a user that have the following mobile device specification:
  • Iphone 5c version: 8.1.2
  • Saleforce 1 v7.0.1
The user does not get redirected when the navigate method execute. Although the alert message does pop-up and the recordId display properly.
 
bob_buzzardbob_buzzard
Where does parentDBRF get set up?  If it is by the actionfunction then it will be empty when the page is rendered so the navigateToSObject call will have an empty parameter.
claperclaper
It is being set up in the constructor of the controller. The weird thing is that the alert statement executes, and shows the parentDBRF value correctly, but then no redirection is done for that user. Android users and other IOs user with different settings works properly.
Kim HellbomKim Hellbom
I have the exact same problem. Claper, did you find a solution to the issue?
Rahul Gupta 76Rahul Gupta 76
Is this problem solved?