You need to sign in to do that
Don't have an account?
App 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();"/>
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();"/>
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....