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
Nancy RajtaNancy Rajta 

Prevent consecutive api navigation calls in visualforce pages - Release update

0
I have an issue related to the release update. Here's the link for the release update article. https://help.salesforce.com/articleView?id=release-notes.rn_vf_navigation_calls.htm&type=5&release=232 According to this release update , it will prevent the unwanted behaviour of multiple API navigation calls that fires consecutively in vf pages. With this release update only the first navigation call will fire. I have tried to replicate the impact of this release update so I have created a vf page that has two api navigation calls and when I had tested it on Desktop and mobile without enabling the release update ,every time the first navigation call fires. It's showing the same behaviour that is mentioned in the release update without enabling it.
Any help would be appreciated.
SwethaSwetha (Salesforce Developers) 
HI Nancy,
Can you share the VF page code that I can use to replicate this behaviour at my end to suggest better.

I see you also posted on https://salesforce.stackexchange.com/questions/348266/prevent-consecutive-api-navigation-calls-in-visualforce-pages-release-update
Nancy RajtaNancy Rajta
Hi Swetha I have created 3 vf pages. Below is the code of all the three pages.

1. test
<apex:page standardStylesheets="false" showHeader="false" applyHtmlTag="false" applyBodyTag="false">
    <head>
        <!-- meta -->
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <!-- lightning desin system -->
        
    </head>
    <body>
        <!-- main -->
        <div class="slds-m-around--medium">
            <button class="slds-button slds-button--neutral" onclick="return changePage();">Back Page1</button>
        </div>
        <!-- javascript -->
        <script type="text/javascript">
            function changePage() {
                if( (typeof sforce != 'undefined') && (sforce != null) ) {
                    console.log('S1');
                    alert('S!');
                    sforce.one.navigateToURL('{!$Page.FirstTestPage}');
                    sforce.one.navigateToURL('{!$Page.SecondTestPage}');
                } else {
                    console.log('Desktop');
                    alert('Desktop');
                    window.location.href = '{!$Page.FirstTestPage}';
                    window.location.href = '{!$Page.SecondTestPage}';
                }
            }
        </script>
    </body>
</apex:page>


2. FirstTestPage

    <apex:page >
        
        <h1>
            Navigated to first page.
        </h1>
    </apex:page>


3.  SecondTestPage

    <apex:page >
        
        <h1>
            Navigated to second page.
        </h1>
    </apex:page>


Whenever I click on the Back Page1 button it always navigate to FirstTestPage whether the release update is enabled or disabled. It's showing the same behaviour as mentioned in the release update even though the release is not enabled.
 
amna sajjadamna sajjad
Am need the solution if the same problem am not need ant again again API nevigaion (https://coffeeccinos.com/best-nespresso-pods-for-latte/) can anyone please help me regarding this problem