function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vipin K 10Vipin K 10 

Help PDF with Picklist Field

User-added image

Hi All, I need to add a Link/Button with picklist list field which would take me to PDF (which explains the picklist field values). I have this requirement on Both Standard/Custom page layout for custom fields. Can someone tell be how can we achieve this? Is this possible through configuration or need to go with customization.
Balayesu ChilakalapudiBalayesu Chilakalapudi
This is possible with customization only.
Create a visualforce page, write javascript for assigning the link value to Help button on changing the value of your picklist field and use it as Standard/Custom page layout.

Let us know if it helps.
LBKLBK
+1 to Bala.

You can make these VF pages as part of the existing page layout to achieve your goal.
LBKLBK
Your VF page will look like the following, with a Picklist and a Button.
 
<apex:page standardController="Test__c" >
<script language="javascript"> 
    function openHelp(){
        var objPick = document.getElementById('j_id0:j_id2:j_id3:j_id4:j_id5:MyPickList');
        window.open("{!URLFOR($Resource.MyHelp,'" + objPick.value + ".pdf')}");
        return false;
    }
</script>
<apex:form >
    <apex:pageBlock >
        <apex:pageblockSection >
            <apex:pageblockSectionItem >
                Picklist: <apex:inputField id="MyPickList" value="{!Test__c.Product_Support__c}"/>
            </apex:pageblockSectionItem>
            <apex:pageblockSectionItem >
                <apex:commandButton id="MyHelpButton" value="Help(PDF)" onclick="javascript:openHelp();"/>
            </apex:pageblockSectionItem>
        </apex:pageblockSection>
    </apex:pageBlock>
</apex:form>
</apex:page>
After the VF page, you need to follow the steps below to complete this implementation.

1. Create a static resource named "MyHelp" that will contain all your help PDF files (Name the files after the Picklist values).

2. Edit the Page layout and add this VF page in a new section or an existing section, based on your requirement.

This will  help you in achieving your requirement.