You need to sign in to do that
Don't have an account?
URGENT: How Do I Limit Records Rendered from a Related List onto a PDF?
I have a VF page that renders a PDF based off of a view. The trouble I'm having is I need to have it only render certain Records from the related list assciated with every reocrd.
Code Sample:
<apex:repeat var="cgs15" value="{!Clinical_Goals}">
<apex:actionRegion rendered="{!IF(AND(cgs15.Therapy_Type__c = 'Oral Motor Therapy', cgs15.RecordType.Name = 'Summary of Outcomes', cgs15.Status__c = 'Active'),True,False)}">
<div>
<h4>{!cgs15.RecordType.Name}</h4>
<p>{!cgs15.Description__c}</p></div>
<p></p><p></p>
</apex:actionRegion>
</apex:repeat>
<apex:repeat var="cg15" value="{!Clinical_Goals}">
<apex:actionRegion rendered="{!IF(AND(cg15.Therapy_Type__c= 'Oral Motor Therapy', cg15.RecordType.Name = 'Long Term Goal'),True,False)}">
<div><h4>Long Term Goal<br></br></h4>
<hr /><h4>
Status: <span class="plain"><u>{!cg15.Status__c}</u></span>
Start Date: <span class="plain"><apex:outputText value="{0,date,dd MMM yyyy}"><apex:param value="{!cg15.Goal_Start_Date__c}" /></apex:outputText></span>
End Date: <span class="plain"><apex:outputText value="{0,date,dd MMM yyyy}"><apex:param value="{!cg15.Goal_End_Date__c}" /></apex:outputText></span>
</h4>
<p>{!cg15.Description__c}</p></div>
<br></br>
<apex:repeat var="stg15" value="{!cg15.Short_Term_Goals__r}" >
<div> <h4>Short Term Goal <br />
Status:<span class="plain"> {!stg15.STG_Status__c}</span></h4>
<p>{!stg15.STG_Description__c}</p></div>
<br></br>
</apex:repeat>
</apex:actionRegion>
</apex:repeat>
Use the rendered property to limit the records. You can do something like this
In the above example all the Short term Goal which has name 'Test' will be rendered
All Answers
Use the rendered property to limit the records. You can do something like this
In the above example all the Short term Goal which has name 'Test' will be rendered
Thank you. This solution worked perfectly.