+ Start a Discussion
Dipti DDipti D 

Referring custom links on Home page components

On our sandbox, I was working on the home page components as in Summer’15 release the java script in the HTML tags will no longer work on home page components. So, I have added the static resources (saved the code as static resources in salesforce) and referred them in the custom links (with execute javascript) and added them on the home page components. It is working like it used to, but I see this error “Invalid Session ID”. I have included the session ID global variable reference in the custom link, but it did not help. How exactly do I have add the session id global variable and in what order? I want to make sure what i am doing is right.Is there a solution for this? (by the way, I am admin, not a developer) 
Dipti DDipti D
I've verified  by clicking on F12 and the error is "Refused to set unsafe header "User-Agent""


function getUser(contact) { 
sforce.connection.sessionId = '{!$Api.Session_ID}'; 
Dipti DDipti D
Thank you for your reply. 
It is still throwing the same error though. 
I have saved the resources (https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js) (name it as HideCustomButton) as a static resource and referred directly
Also my custom code i referred directly.
Inbetween these two, i pasted the response you provided but it is still the invalid session id doesn't go away.
Am i doing something wrong here?

function getUser(contact){sforce.connection.sessionId="{!$Api.Session_ID}"; 

Praveen EmmadiPraveen Emmadi
Deepthi are u be bale to find the ans for this
Dipti DDipti D
Hi Praveen. We took the help of a developer who fixed the issue. He has completely developed a new way to avoid this error. Thanks