8

We are currently sending users to a case page after they click "next" on a VisualForce page. The case opens up in the feed, assuming that the user's page layout is feed-based. By default, the publisher is collapsed in the page layout - which is how we normally want it when not accessed from the VF page.

But, in this one particular situation where the case is being accessed from the VF page, we would like the case to show up with the publisher expanded. I can't seem to figure out how to do this.

When inspecting the case feed page source, I found a function that might help, but I don't even know where I'd put this since it's really something that needs to be inserted in the page that has the publisher itself - yet, we're not using a custom VF page to render the publisher.

entityFeedPage.getPublisher().expand()
entityFeedPage.getPublisher().collapse()

Any ideas on how I can do this without trying to put the entire feed into a VF page?

Here's a screenshot of the VF page:

Screenshot of VF page

And a screenshot of the collapsed publisher:

Screenshot of VF page

And lastly, a screenshot of the expanded publisher (which is what we want when the user is navigated to the case from the VF page):

enter image description here

  • an annotated screen shot might make this clearer – cropredy Mar 6 '16 at 6:29
1

Create a new VF page that simply renders the standard layout using <apex:detail>, but has some additional logic that inspects the URL parameters to determine if the publisher should be expanded (and if so, runs the additional JS code you spotted)

Now from the original VF page you can redirect to the standard VIEW page reference, but adding a new param ref.getParameters().put('expand','1').

The new VF page is still admin configurable, since it uses the standard layout, so you don't really lose a lot of functionality; but you do gain the ability to run some custom logic when the page loads.

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.