1

I've edited a custom object to include a reference to a custom help page. That page is a VF page with a controller class. For "Context-Sensitive Help Setting" I have "content Name" = "myCustomPage".

My question is how can I refer to the original object from that custom help page or its controller class?

When that page launches, the Apex.Currentpage in the controller is the help page, not the original standard layout page.

I looked into using the "referer" header. this is helpful for layouts/pages that show an instance of the object. But the referer value was NOT if the help page is called from a related list within a larger page. Then, the referer value was the URL for the whole previous page, and I couldn't figure out the specific related list from there.

1 Answer 1

1

The mechanism for custom objects is (as you have discovered) very limited in that the only thing that can be selected is a Visualforce page name.

We have resorted to creating multiple pages of this nature (called e.g. HelpXyz):

<apex:page
        action="{! URLFOR($Resource.Help, 'Xyz.html') }"
        showHeader="false"
        sidebar="false"
        standardStylesheets="false"
        />

where each page redirects to a different page in a ZIP static resource that contains the help topics.

Given these pages, you can choose (or create) the most appropriate one for each custom object.

2
  • My goal was the reduce the number of custom help pages by centralizing some common logic (naturally). Our default implementation has been to do what you're doing, making 1:1 pages per object. Thanks for confirming that we're stuck. I was briefly encouraged by the ID in the "referer" header, but that seems to be imperfect, because the data is not there when the click comes from a related list.
    – SeanW
    Apr 27, 2016 at 13:01
  • @SeanW Yeah it is frustrating as Visualforce pages need adding to profiles too. Very tempting to have just a single page that shows the TOC of the help.
    – Keith C
    Apr 27, 2016 at 13:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .