You need to sign in to do that
Don't have an account?
Jim Montgomery
getting redirected to Salesforce login page after location.href= in javascript
Code.
Getting sent to the login page on re-direct.
<apex:page standardController="Apttus_Proposal__Proposal__c"> <script src="/soap/ajax/10.0/connection.js"> </script > <script src="/soap/ajax/10.0/apex.js"> </script > <apex:iframe src="{!URLFOR($Resource.SAP_Order_Checklist)}" id="theIframe"/> <script type="text/javascript"> window.onload=init() function init() { var p = new sforce.SObject('Apttus_Proposal__Proposal__c'); p.Id = "{!Apttus_Proposal__Proposal__c.Id}"; p.sap_checklist_accessed__c = true; result = sforce.connection.update([p]); location.href="https://wktaatest--taatest.cs54.my.salesforce.com/"+p.Id }; </script> </apex:page>
Getting sent to the login page on re-direct.
<apex:page standardController="Apttus_Proposal__Proposal__c"> <script src="/soap/ajax/10.0/connection.js"> </script > <script src="/soap/ajax/10.0/apex.js"> </script > <apex:iframe src="{!URLFOR($Resource.SAP_Order_Checklist)}" id="theIframe"/> <script type="text/javascript"> window.onload=init() function init() { var p = new sforce.SObject('Apttus_Proposal__Proposal__c'); p.Id = "{!Apttus_Proposal__Proposal__c.Id}"; p.sap_checklist_accessed__c = true; result = sforce.connection.update([p]); location.href="https://wktaatest--taatest.cs54.my.salesforce.com/"+p.Id }; </script> </apex:page>
If I understand your code directly - below is what your code is right ? Just trying to understand it better - how are you invoking your VF page and also I guess you have registered a force.com domain and have created a site under it ? Login screen usually comes when you are trying to access a restricted page.