How to Add link inside the FIELDSET

Wednesday, July 15, 2015
Hey Guys,

If anybody need to set link of another visualforce page or anything else on particular  field's value in fieldset... try below mention code,

<apex:pageBlock title="Opportunity" id="Block1">
          <apex:pageBlockSection title="Opportunity Detail">
                 <apex:pageBlockSectionItem >
                       Account Name
                       <apex:outputLink value="YOUR URL">
                                  <apex:outputfield value="{!Opportunity.Account.Name}" />
                      </apex:outputLink>
          </apex:pageBlockSectionItem>
          <apex:repeat value="{!$ObjectType.Opportunity.FieldSets.Opportunity_Detail_Page}" var="field">
                <apex:outputField value="{!Opportunity[field.fieldPath]}" />
          </apex:repeat>
        </apex:pageBlockSection>
</apex:pageBlock>


Please put your suggestion or anything else in comment box.


Thank you. 

No comments: