• bpkeating
  • NEWBIE
  • 0 Points
  • Member since 2012
  • Lead Developer

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies

I have a user requirement for a user to accept a terms of service agreement after they log in.

 

Their acceptance will be recorded and then they are to be allowed to access the partner portal.

 

So far I have tried using different forms of site.login starturl and pagereference redirects with out any success. The custome login page always takes me to the associated partner portal for the login associated to the site.

 

return

Site.login(username, password, '\visualforcepagename');

 

I would like to direct the user through the terms of service page on login or redirect them to it when the get into the portal if they have not accepted the terms.

 

 

I have a user requirement for a user to accept a terms of service agreement after they log in.

 

Their acceptance will be recorded and then they are to be allowed to access the partner portal.

 

So far I have tried using different forms of site.login starturl and pagereference redirects with out any success. The custome login page always takes me to the associated partner portal for the login associated to the site.

 

return

Site.login(username, password, '\visualforcepagename');

 

I would like to direct the user through the terms of service page on login or redirect them to it when the get into the portal if they have not accepted the terms.

 

 

Hi Forum members

 

I added a hoover to my visualforce page and the hoover appears on the mousover event of a label

 

onmouseover calls a javascript code which is following

 

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

 

       function myHover()
       {  

 

             sforce.connection.sessionId = "{!$Api.Session_ID}

             var resultQuery = " Select ID,Name from ACCOUNT LIMIT 2";

              

                     try
                    {
                        result = sforce.connection.query(resultQuery);
                    }
                    catch(e)
                    {
                        alert(e);
                    }

 

 

           //Some Code to show hoover with result

 

       }

 

 

Now the problem is this code works fine in a DEVELOPER Org and shows data of above query on hoover

 

But when i run this same code in sandbox or any Trial org 

the line  sforce.connection.query(resultQuery); raise following excepion

 

 

 

 

{faultcode:'sf:INVALID_SESSION_ID', faultstring:'INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session', detail:{UnexpectedErrorFault:{exceptionCode:'INVALID_SESSION_ID', exceptionMessage:'Invalid Session ID found in SessionHeader: Illegal Session', }, }, }

 

 

 

 

 

Please comment if someone knows the solution of this problem

 

Thanks

 

Message Edited by Nikhil on 04-07-2009 02:46 AM
  • April 07, 2009
  • Like
  • 1