• GaryRaife
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

Hello -

 

I am trying to add a visualforce page to my custom object that will show the related products.

 

So my "Sales Checklist" object is housed on the opportunity, sales fills all the information out then the object is sent to a queue.

 

But to save time i want to pull in the opportunityLineItems in to the sales checklist?

 

Is this possable? I know very little visualforce.

 

This is as far as I have gotten:

 

<apex:page StandardController="Sales_Checklist__c">
<apex:relatedList list="Opportunity__r" />

<apex:pageBlock title="{!Sales_Checklist__c.Opportunity__r.Name}"/>

  <apex:dataTable value="{!Sales_Checklist__c.Opportunity__r}" var="opp" cellPadding="4" border="1">
                
           <apex:column ><apex:facet name="header">Product Name</apex:facet></apex:column>
                
                
           <apex:column><apex:facet name="header">Quantity</apex:facet></apex:column>
                
                
           <apex:column ><apex:facet name="header">Unit Price</apex:facet></apex:column>
                
              
           <apex:column ><apex:facet name="header">Total Price</apex:facet></apex:column>
  </apex:dataTable>
</apex:page>

 

 

any help would be greatlt appriciated

 

Thanks,

Niki

 

This is my VF code:

 

<apex:dataTable value="{!Order__c.Opportunity__r.OpportunityLineItems}" var="d">
	<apex:column headerValue="Desc" value="{!d.Description}"/>
</apex:dataTable>

 

I am receiving an error: Error: Aggregate Relationship is used in an unsupported complex expression containing 'opportunity__r.opportunitylineitems'

 

 

Order__c is a custom object which has master-detail relationship with opportunity. I am trying to display the OpportunityLineItem details in a VF page on click of a button(Generate Order, present in Order detail page).

 

Can anybody explain whats wrong?