I have a custom object and created a custom picklist with values like "New, Backlog,Stream, Investigation". I have created pageBlockSections with respect to each picklist value on the vf page with names "New, Backlog, Stream, Investigation", now I want if I select New then page scroll to the "New" section and if I select "Investigation" from the picklist then page scroll to the "Investigation" section.

I am trying to put the render based on the picklist value selected but seems not working.

Picklist code snippet:

<apex:pageBlockSection title="Status">
         <apex:actionRegion >
            <apex:inputField value="{!user_Story__c.Status1__c}">
                <apex:actionSupport event="onchange" reRender="Investigation" />

Above code is also not working for the single one.


It's not something which you can do without using custom vf page since injecting javascript is no longer supported by Salesforce. I think you can do something like below -

Create a VF page and embed it in your page layout at the top. VF page will have the picklist options and when a user selects an option then fire a javascript event and it will scroll the view to the desired element.

Article Link - Embed Visualforce page in a page layout

| improve this answer | |
  • I created the vf page but how can I make sure that it should scroll to that particular section, do I need to go to JS ? – Ashutosh Aug 8 '18 at 9:01
  • Yes, you will need some JS code to scroll the view. Check the web for more help on JS code. – Naval Sharma Aug 8 '18 at 11:24

Standard Salesforce detail edit page you can't do any modifications. I understood you are looking that based on selection it should go to selected section but it's not possible.

Not sure how much possible through inline VF page. Just check and try.

| improve this answer | |

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.