1

I am interested in adding "custom button functionality" to some managed Visualforce pages, where I cannot touch the actual page itself.


My first thought is to use the Force.com menu, but it seems like it's not possible to control people there (make it read-only to users so they're not touching/ adding/ etc).

The Sidebar Components "on all pages" option is turned on, also as a possibility.

In either scenario, I am hoping (no investigation yet) that I can access the current SF ID being viewed if any to include on the URL of a custom link - IF I were to try and use that to "execute" code similar to a custom button that would normally exist on the LAYOUT ITSELF.

MORE IDEALLY would be that the links shown (or buttons?!) would be object (or layout) specific - only show buttons/links relevant to the page being shown. This is secondary to being to do it at ALL.


I want to add "buttons" (or links doing the same thing) to managed layouts where I cannot edit the layout

See screenshot. UPDATE: Just discovered the Sidebar Components are not visible on the VF pages, so all I have to work with is Force.com popout, which is editable (or invisible) by everyone.

Any thoughts on this? Any AppExchange items I'm not finding?

enter image description here


UPDATE 1:   We are looking at using something like WalkMe to get around this. WalkMe is able to read from the Source on the displayed page, and render anything you want in a popup onscreen. We have a Proof Of Concept where it reads from an "SFID" custom variable, and creates a URL using that ID in the URL. This would be fine, too. Just hate the idea of using an entire solution like WalkMe for JUST a popup on a few pages.

enter image description here

  • Could you wrap that managed VF page inside one you own? If so, you could potentially do it from the parent page. – Sebastian Kessel Jan 24 '17 at 18:47
  • 1
    Holy sheep dip, batman. I have no clue.... but damn, it's worth a try... – AMM Jan 24 '17 at 18:52
  • Presumably I'd think you could create a quick action for those pages that will either pop-up a lightning component or execute any JS you want to execute. – crmprogdev Jan 24 '17 at 19:05
  • Lightning is not enabled (and won't be). As for JS... I want it to be selective (user clicks to make it happen). :-/ Are you implying LINKS on either popout to run the JS. Right now I'm playing with the VF wrapper idea. Makes me of course wish I'd done more than 15 minutes of VF before now...... – AMM Jan 24 '17 at 19:08
  • I'm done trying to make either apex:include or apex:iframe work as a wraparound. (sigh) INCLUDE says Method is not visible, and IFRAME can work, but yields the entire page in the iframe including the SF header and Component toolbar. I don't even know if I can click a button from the main iFrame I write into the iFrame that includes the page I need. – AMM Jan 24 '17 at 20:43
0

Did you try this <apex:include>:

<!-- Page: -->
<apex:page id="thePage">
    <apex:outputText value="(page) This is the page."/><br/>
    <apex:include pageName="Namespace.ManagedPageName"/>
</apex:page>

<!-- Page: include -->
<apex:page id="theIncludedPage">
    <apex:outputText value="(include) This is text from another page."/>
</apex:page>
  • I was trying apex:iframe actually (but I'm actually having trouble remembering how to properly reference a VF page akin to apex:iframe src = "{!page}" ... apparently my memory AND my google search are failing me. Will try your sample code - thanks. – AMM Jan 24 '17 at 19:14
  • So just using the first half of the example, I'm getting ... Error: Method is not visible: [rstk.ControllerExtnSalesOrder].doBeforePageLoad() ... (sigh) – AMM Jan 24 '17 at 19:22
  • Since the VF page is rstk__SalesOrder ... and the URL to a given SOrder record is: rstk.cs26.visual.force.com/apex/… ... I've tried pageName as "rstk.SalesOrder" (yields the above error) and "rstk__SalesOrder" (yields Unknown Page). – AMM Jan 24 '17 at 20:08
  • longwinded way allows an iFrame insert (spelling out the entire URL and adding the "id" variable from the URL that loaded the page). Now to test if I can properly affect the page that has been "iFramed" in (or possibly move to "include" instead). – AMM Jan 24 '17 at 20:24
  • You will not be able to cal any packaged application method. You can only include the page and hack it with javascript. @AMM – Ashwani Jan 24 '17 at 21:07

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.