", "answerCount": 1, "upvoteCount": 0, "datePublished": "2015-02-10T03:29:59.000Z", "author": { "@type": "Person", "name": "Snehith Challuri", "url": "https://trailblazers.salesforce.com/profileView?u=00530000009rRdgAAE", "affiliation": { "@type": "Organization", "name": "Intralinks" } }, "suggestedAnswer": [ { "@type": "Answer", "text": "Don't you think it is recursive? When page first time load it calls the `change()` fucntion and after that it redirect to URL `current` and then it calls the `change()` function (it should) again, after that is call navigateToURL and this process goes on upto infinity.", "upvoteCount": 0, "url": "https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007T4MgoSAF", "datePublished": "2015-02-18T09:34:39.000Z", "author": { "@type": "Person", "name": "Ashwani Soni", "url": "https://trailblazers.salesforce.com/profileView?u=00530000008BoIiAAK", "affiliation": { "@type": "Organization", "name": "S" } } } ] } }
Skip to main content

Below is the VF page for which we are performing URL hack and overriding the new account button with the below page.The button is working fine but when I use the same button through communities .ready function is being called continuously and page keeps on loading. Any help on what's causing the issue/how to resolve it is much appreciated.

<apex:page standardcontroller ="Account">

<script type="text/javascript" src="/js/function.js"/>

<script type ="text/javascript" src="/soap/ajax/28.0/connection.js"/>

<script language = "Javascript">

var j$ = jquery.noconflict();

var current;

J$(document).ready(function() {

change();

window.parent.navigateToUrl(current); });

function change() {

current = window.location.href;

current = current.replace("/apex/page","/00Qe/e");

current = current.replace("&sfdc.override =1","&nooverride =1");

current = current.replace("&save_new=1","");

current+= "&lea3=do not fill in"; }

</script>

</apex:page>

1 answer
  1. Feb 18, 2015, 9:34 AM
    Don't you think it is recursive? When page first time load it calls the `change()` fucntion and after that it redirect to URL `current` and then it calls the `change()` function (it should) again, after that is call navigateToURL and this process goes on upto infinity.
0/9000