• David Forder 15
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hi all,

Each Account record on our system is allocated a "Range" type - this lists the products they carry in stock. eg On the Accounts Object we have a field called "Range__c" and for each relevant Range record we have many Products listed.

I would like to display on the Accounts page a list of the products that apply for that particular Accounts "Range__c" .. I guess a VF page added will do the job but no real idea how to create a vf page for the accounts detail page that will list the products filtered by that Accounts "Range__c"

Can anyone help me alter the code below (I do have the vf code for the range page) to allow it to be used on the Account page and filter for the field Range__c  .. appreciate any help at all :)

<apex:page standardcontroller="Range__c">
<apex:messages />
    <apex:sectionheader title="{!$ObjectType.Range__c.label} Detail" subtitle="{!Range__c.Name}"/>   
    <apex:form >
        <apex:pageblock mode="maindetail" title="{!$ObjectType.Range__c.label} Detail">
         
            <apex:outputpanel >
                <apex:pageblocksection title="Information" showheader="false" collapsible="false" columns="2">
                    <apex:outputfield value="{!Range__c.Name}"/>
                    <apex:pageblocksectionitem />
                </apex:pageblocksection>
            </apex:outputpanel>
        </apex:pageblock>
    </apex:form>
    <!-- **********   [Related Lists for Record Type : Master ]   **********  -->
    <apex:outputpanel >
        <apex:relatedlist list="Products__r" title="Products"/>
    </apex:outputpanel>
  
</apex:page>










 
Hi all,

Each Account record on our system is allocated a "Range" type - this lists the products they carry in stock. eg On the Accounts Object we have a field called "Range__c" and for each relevant Range record we have many Products listed.

I would like to display on the Accounts page a list of the products that apply for that particular Accounts "Range__c" .. I guess a VF page added will do the job but no real idea how to create a vf page for the accounts detail page that will list the products filtered by that Accounts "Range__c"

Can anyone help me alter the code below (I do have the vf code for the range page) to allow it to be used on the Account page and filter for the field Range__c  .. appreciate any help at all :)

<apex:page standardcontroller="Range__c">
<apex:messages />
    <apex:sectionheader title="{!$ObjectType.Range__c.label} Detail" subtitle="{!Range__c.Name}"/>   
    <apex:form >
        <apex:pageblock mode="maindetail" title="{!$ObjectType.Range__c.label} Detail">
         
            <apex:outputpanel >
                <apex:pageblocksection title="Information" showheader="false" collapsible="false" columns="2">
                    <apex:outputfield value="{!Range__c.Name}"/>
                    <apex:pageblocksectionitem />
                </apex:pageblocksection>
            </apex:outputpanel>
        </apex:pageblock>
    </apex:form>
    <!-- **********   [Related Lists for Record Type : Master ]   **********  -->
    <apex:outputpanel >
        <apex:relatedlist list="Products__r" title="Products"/>
    </apex:outputpanel>
  
</apex:page>