function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
App SharkApp Shark 

Navigation Issue in SF1

When writing script and navigating it to detailed page I am getting an below error.

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://sateeshsfdev-dev-ed.lightning.force.com') does not match the recipient window's origin ('https://sateeshsfdev-dev-ed--c.ap2.visual.force.com').

 Code.
<script src="/soap/ajax/33.0/connection.js" type="text/javascript"></script>
    <script type="text/javascript">
    function navigateToDetailPage() {
        alert('--hi--');
        if( (typeof sforce.one != 'undefined') && (sforce.one != null) ) {
             sforce.one.navigateToSObject('00628000006YM8I');
        }
    }
</script>

Button:

<apex:commandLink value="SUBMIT" onclick="navigateToDetailPage();"/>
 
Syan PillarSyan Pillar
The actual home page of Salesforce1 can be configured by the system administrator - I haven't found a way to get at that information.
The following JavaScript takes me back to the default main page though (on my iOS installed application at any rate) aka the 'feed' in the menu:
sforce.one.navigateToURL('/_ui/core/chatter/ui/ChatterPage');

Sukhbir Singh Badal (http://sukhbirsinghbadal.blog.com)

Thanks....