3

I want to show/hide custom button on a standard page using picklist value. I searched on google and found many solution using JS Hack. But in Sales force Summer 14 version they remove show HTML from Home Page Component. So how i do that task any other way or solution is available.

4
  • Have you looked at using a workflow rule, record type and page layout? Or does the button need to be removed as soon as the value is selected? I believe the later would need a Visualforce page.
    – Girbot
    Oct 14 '14 at 8:30
  • Yes i did that but you can't access standard control from visualforce page. it throws error stating "Blocked a frame with origin "c.ap1.visual.force.com" from accessing a cross-origin frame." Oct 16 '14 at 7:44
  • I was thinking more of using an apex:commandbutton with the rendered tag, and rerendering it when the picklist gets updated (that's a very simplified description). Does that sound viable to you?
    – Girbot
    Oct 16 '14 at 8:55
  • Hi Girbot, Thank you for your suggestion. Should we add apex:commandbutton with the rendered tag in standard page, so i can render apex:commandbutton using picklist value. Oct 17 '14 at 6:48
1

HTML Area home page components were not removed in Summer '14 and are not going to be removed. The quote from the Summer '14 release notes, shown below, states that SalesForce have introduced a new Visualforce Area home page component that should be used when you need to do JavaScript, CSS or iframes. The old HTML Area home page components will still work but SalesForce will not guarantee that your Javascript will work correctly in then after Summer '15.

You will still be able to do your JavaScript hack but should use a Visualforce Area component rather than a HTML Area component.

In Summer ’15 we will start removing unsupported code from HTML Area home page components. As a result, components that contain JavaScript, CSS, iframes, or other unsupported markup might stop working properly. To use JavaScript or other advanced HTML elements in your home page component, we recommend that you use a Visualforce Area component instead.

1
  • Hi BarCotter, Thank you for your reply. i Checked your solution but it's not working. I want to Hide/show Custom button on Standard Page, but for that i have to use javascript and there is only way to insert javascript is VisualForce Page. but when i do so, it throws an error stating "Blocked a frame with origin "c.ap1.visual.force.com" from accessing a cross-origin frame." So how can i show or hide custom button in standard page. Oct 16 '14 at 7:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.