• Dmitry Omelchenko
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
I've overridden "New" button of custom object with Visualforce page. When I click this button it should redirect to another one.app page in Salesforce1 but it's not working and says "Something has gone wrong. $A.getDefinition. Please try again."

My Visualforce page:
<apex:page standardController="Note__c" sidebar="false" showHeader="false" standardStylesheets="false" applyBodyTag="false" applyHtmlTag="false" showQuickActionVfHeader="false">
<script>
    var url = '/one/one.app#eyJjb21wb25lbnREZWYiIDogImM6cXVpY2tBZGQiLCJhdHRyaWJ1dGVzIiA6IHt9fQ==';
sforce.one.navigateToURL(url, true);
</script>    
</apex:page>

However, it's working when I do
window.parent.location = '/one/one.app#eyJjb21wb25lbnREZWYiIDogImM6cXVpY2tBZGQiLCJhdHRyaWJ1dGVzIiA6IHt9fQ==';

Any suggestions much appreciated.
Thanks.