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
College ManagementCollege Management 

(Home Page components)How to get EditPage values to visualforce area componment ?

Hi, I've created a visualforce area Home page component with a commandlink in it and added it to Home page layout. I want to get the value of editpage onclicking the link which is present in component.


Thanks !
Best Answer chosen by College Management
bob_buzzardbob_buzzard
You can't do that in sidebar components any more - Salesforce stopped this as of Summer 14. Existing JavaScript in sidebars will only work until Summer 15.

The replacement Visualforce sidebar component doesn't have access to the main Salesforce page due to the browser same origin policy.

All Answers

bob_buzzardbob_buzzard
Can you tell us what is displayed in the component, and also what you mean by editpage - do you want the standard Salesforce edit page for a record or something else?
College ManagementCollege Management
Hi Bob,
I've created a visualforce page with a commandLink in it and added it to a visualforce area home page component.And now the component is being displayed in the sidebar for every page. Previously we used document.getElementById("inspectelementid of a field").value .  in HTML area component to get the value entered in standard salesforce edit page. Likewise i want to get the value using visualforce area component onclicking the link in sidebar component, but i am not getting any value.

Thanks!
bob_buzzardbob_buzzard
You can't do that in sidebar components any more - Salesforce stopped this as of Summer 14. Existing JavaScript in sidebars will only work until Summer 15.

The replacement Visualforce sidebar component doesn't have access to the main Salesforce page due to the browser same origin policy.
This was selected as the best answer
College ManagementCollege Management
Isn't there any other way i can achieve it ??

Thanks !
bob_buzzardbob_buzzard
I'm afraid not - it looks like Salesforce didn't like this capability and shut it down.  The only other way would be a browser plugin like grease monkey.
College ManagementCollege Management
Thanks Bob.