• jesse1.393977588133575E12
  • NEWBIE
  • 0 Points
  • Member since 2014

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

Hello Salesforce Experts,

 

Anyone please let me know how to write valition rule for URL ?

Else someone please provide regular expression string for URL ?

 

Thanks,

I am working on outputting a custom object to PDF by Email/VisualForce template.  So far I have been successful with everything, but just ran across something that I need help with.  As part of the PDF we are including four related lists that display on the objects page view.  All the related lists contain fields from a single object except one.  One of the related lists displays fields from two custom objects (Training_Attendee__c & Training_Course__c) on the page view.  On the object this relationship is formed by a lookup field from the 'Training_Attendee__c'  object to the 'Training_Course__c' object.  This is what I am having trouble with.  For the other three related lists I ran a apex:repeat and associated it with the single object that was needed and that worked fine...code example below:


<apex:repeat var="cx" value="{!relatedTo.Cases__r}">     
   <tr>
    <td>
       {!cx.CaseNumber}
    </td>
    <td>
       {!cx.Subject}
    </td>
    <td>
       {!cx.Case_Hours__c}
    </td>
   </tr>
</apex:repeat>


Except now that I need to pull data from two objects I am not sure how to associate both objects to the same apex:repeat statement ...current code example for this particular related list is below:

 

<apex:repeat var="IGXTraining" value="{!relatedTo.Training_Attendee__r}">
   <tr>
    <td>
       <apex:outputField value="{!IGXTraining.Name}" />
    </td>
    <td>
       <apex:outputField value="{!IGXTraining.Training__c}" />
    </td>
    <td>
	// value is from another custom object (Training_Course__c)
	// association is by lookup field on Training_Attendee__c to Training_Course__c
       {Location}
    </td>
    <td>
	// value is from another custom object (Training_Course__c)
	// association is by lookup field on Training_Attendee__c to Training_Course__c
       {StartDate}
    </td>
    <td>
       <apex:outputField value="{!IGXTraining.Course_Credit__c}" />
    </td>
   </tr>
</apex:repeat>

 

On the related list it automatically makes the association between the two objects so you can list fields from both on the page view:

 

 

 

Is it possible to associate a two object relationship using apex:repeat?  If so any examples would really be appreciated.  Thanks in advance!