• June Bischoff
  • NEWBIE
  • 0 Points
  • Member since 2014

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

I'm fairly new to Visualforce.  I'm working with custom objects in a managed package, attempting to create an email template with a table of related detail rows.  My visualforce email template is set to use the custom object "Sales Order":

<messaging:emailTemplate recipientType="Contact"
    relatedToType="PBSI__PBSI_Sales_Order__c"
    subject="Order and Shipping Confirmation for PO {!relatedTo.PBSI__Customer_Purchase_Order__c}">    
<messaging:htmlEmailBody > 

And I'm trying to access a related list custom object (Shipped Sales Order Lines) that has a lookup to the Sales Order but not a master/detail relationship.  
<apex:repeat var="ssoLine" value="{!relatedTo.PBSI__Shipped_Sales_Order_Lines__r}">

I'm getting an error :   [Error] Error: Invalid field PBSI__Shipped_Sales_Order_Lines__r for SObject PBSI__PBSI_Sales_Order__c.

I've tried using {!relatedTo.PBSI__Shipped_Sales_Order_Lines__r} as well as {!relatedTo.PBSI__Shipped_Sales_Order_Line__r}, but no luck.  Will this work with a lookup field relationship, or does it need to be master-detail?  How can I find the correct API Name if it is possible with only a Lookup?  If it's not possible, do I need to go the custom component/controller route, or are there other methods to access the related data?

Thanks in advance!

Shipped Sales Order Line info:
Singular Label: Packed Sales Order Line 
Plural Label: Shipped Sales Order Lines 
Object Name: Shipped_Sales_Order_Line 
API Name: PBSI__Shipped_Sales_Order_Line__c

Lookup field on Shipped Sales Order Line
Field Label  API Name                     Installed Package   Data Type
Sales Order PBSI__Sales_Order__c Ascent4Salesforce Lookup(Sales Order)

As a side note, I am able to access related Sales Order Lines, which do have a master/detail relationship to the Sales Order:
<table>
    <apex:repeat var="soLine" value="{!relatedTo.PBSI__Sales_Order_Lines__r}">
    <tr>
        <td width="20%">{!soLine.PBSI__Item__r.Name}</td>
        <td align="center">{!ROUND(soLine.PBSI__Quantity_Needed__c,0)}</td>
    </tr>
    </apex:repeat>   
</table>

Hello,

I am looking for some feedback on the various IDE options for Salesforce.  What makes you choose one over the other?  Pros & Cons?  Am I missing other options?

I would like to invest the time into learning an IDE very well, but was looking for some guidance in choosing the right one before I dive in to later decide I should have chose a different one because of x, y, or z.  

I realize this is a subjective question, but hearing the opinions of those with experience will greatly help those with less experience like myself.  

Thanks for your input!

I'm fairly new to Visualforce.  I'm working with custom objects in a managed package, attempting to create an email template with a table of related detail rows.  My visualforce email template is set to use the custom object "Sales Order":

<messaging:emailTemplate recipientType="Contact"
    relatedToType="PBSI__PBSI_Sales_Order__c"
    subject="Order and Shipping Confirmation for PO {!relatedTo.PBSI__Customer_Purchase_Order__c}">    
<messaging:htmlEmailBody > 

And I'm trying to access a related list custom object (Shipped Sales Order Lines) that has a lookup to the Sales Order but not a master/detail relationship.  
<apex:repeat var="ssoLine" value="{!relatedTo.PBSI__Shipped_Sales_Order_Lines__r}">

I'm getting an error :   [Error] Error: Invalid field PBSI__Shipped_Sales_Order_Lines__r for SObject PBSI__PBSI_Sales_Order__c.

I've tried using {!relatedTo.PBSI__Shipped_Sales_Order_Lines__r} as well as {!relatedTo.PBSI__Shipped_Sales_Order_Line__r}, but no luck.  Will this work with a lookup field relationship, or does it need to be master-detail?  How can I find the correct API Name if it is possible with only a Lookup?  If it's not possible, do I need to go the custom component/controller route, or are there other methods to access the related data?

Thanks in advance!

Shipped Sales Order Line info:
Singular Label: Packed Sales Order Line 
Plural Label: Shipped Sales Order Lines 
Object Name: Shipped_Sales_Order_Line 
API Name: PBSI__Shipped_Sales_Order_Line__c

Lookup field on Shipped Sales Order Line
Field Label  API Name                     Installed Package   Data Type
Sales Order PBSI__Sales_Order__c Ascent4Salesforce Lookup(Sales Order)

As a side note, I am able to access related Sales Order Lines, which do have a master/detail relationship to the Sales Order:
<table>
    <apex:repeat var="soLine" value="{!relatedTo.PBSI__Sales_Order_Lines__r}">
    <tr>
        <td width="20%">{!soLine.PBSI__Item__r.Name}</td>
        <td align="center">{!ROUND(soLine.PBSI__Quantity_Needed__c,0)}</td>
    </tr>
    </apex:repeat>   
</table>