Timeline for Please , how to retrieve line items to Visualforce Email Template?
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 21, 2015 at 16:26 | comment | added | cropredy |
Julio - There are several ways to look up the relationship name. (1) Use the Eclipse schema browser. (2) in Force.com UI, go to the Sales_Order_Line_Item__c SObject, locate the field that is the master-detail field, then inspect the Child RelationShip Name property in the UI - Use that property value, appended by __r
|
|
Jul 21, 2015 at 8:03 | comment | added | Julio Ludovic Ramihone | please I need your help I have the same problem . on template related to the sales order 'relatedToType="Sales_Order__c" >' on sales order line item I need to repeat : ' <apex:repeat var="opp" value="{!relatedTo.Sales_order_line_items__r}">' when I check the sales order line item object ; I see plural label : Sales Order Line Items . when I test it with : '{!relatedTo.Sales_order_line_items__r}"' there is an error 'Error: Invalid field Sales_order_line_items__r for SObject Sales_Order__c ' do you have an idea I don't know the rule for __r API name | |
Jun 30, 2015 at 16:44 | comment | added | cropredy |
you need {!opp.Product__r.description} assuming that the Description field in the Product2 sobject has the description you are interested in. It is well worth your time to read the doc on how relationships are referenced in Salesforce (that is, for custom relationships, you use xxxx__r to traverse the relationship)
|
|
Jun 30, 2015 at 12:02 | vote | accept | Julio Ludovic Ramihone | ||
Jun 30, 2015 at 3:58 | comment | added | Julio Ludovic Ramihone | >> thanks , it helps me a lot . My only problem is on the product decsription . here is the code : link . the problem is at product it returns salesforce id instead of product description | |
Jun 30, 2015 at 0:26 | history | answered | cropredy | CC BY-SA 3.0 |