You need to sign in to do that
Don't have an account?
N00b having trouble with code
I'm new to Visualforce, but was given a fully running web site to maintain. I'm trying to make a small change to a visualforce page that produces a PDF. I understood all the formatting language, but I'm stuck on this line (See red lines below).
<apex:repeat var="cgs12" value="{!Clinical_Goals}">
<apex:actionRegion rendered="{!IF(AND(cgs12.Therapy_Type__c = 'Speech Therapy', cgs12.RecordType.Name = 'Summary of Outcomes From Previous IP Period'),True,False)}">
<h2>Speech Therapy - {!cgs12.Owner.Name}</h2>
<table cellpadding="10" width="99%" border="1">
<tr>
<td bgcolor="#ffffff" style="color:#000000">{!cgs12.RecordType.Name} ({!cgs12.IP_Period_Start__c}) </td>
</tr>
<tr>
<td bgcolor="#ffffff" style="color:#000000">{!cgs12.RecordType.Name} ({!cgs12.IP_PERIOD_END__c}) </td>
</tr>
<tr>
<td bgcolor="#ffffff" style="color:#000000"> <p>{!cgs12.Description__c}</p> </td>
</tr>
</table><p></p><p></p>
</apex:actionRegion>
</apex:repeat>
The line orignally looked like this:
<tr>
<td bgcolor="#ffffff" style="color:#000000">{!cgs12.RecordType.Name} ({!cgs12.IP_Period__c}) </td>
</tr>
The trouble was that it was a picklist and I needed to change it to a start date and end date. But now the dates don't show up on the PDF. What am I doing wrong?
Ran a Debug Log this is the result:
21.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WORKFLOW,INFO 11:52:15.032 (32506000)|EXECUTION_STARTED 11:52:15.032 (32551000)|CODE_UNIT_STARTED|[EXTERNAL]|066F0000001TbyJ|VF: /apex/clinical_goalsM1 11:52:15.866 (250054000)|CUMULATIVE_LIMIT_USAGE 11:52:15.866|LIMIT_USAGE_FOR_NS|(default)| Number of SOQL queries: 0 out of 100 Number of query rows: 4 out of 50000 Number of SOSL queries: 0 out of 20 Number of DML statements: 0 out of 150 Number of DML rows: 0 out of 10000 Number of script statements: 0 out of 200000 Maximum heap size: 0 out of 6000000 Number of callouts: 0 out of 10 Number of Email Invocations: 0 out of 10 Number of fields describes: 0 out of 100 Number of record type describes: 0 out of 100 Number of child relationships describes: 0 out of 100 Number of picklist describes: 0 out of 100 Number of future calls: 0 out of 10 11:52:15.866|CUMULATIVE_LIMIT_USAGE_END 11:52:15.250 (250099000)|CODE_UNIT_FINISHED|VF: /apex/clinical_goalsM1 11:52:15.250 (250110000)|EXECUTION_FINISHED
Hi
Is this value queried in the controller?
Can you try ding outputfiled for the date?
Also do you have one VF page or multiple with one for screen view and one for PDF?
Hi,
Please check the debug log or VF page itslef that even value for {!cgs12.IP_Period_Start__c} coming or not?
Hi,
Salesforce does not recommend using <apex:actionRegion> when you are rendering the page as PDF. For more information look at the following link
http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_additional_render_pdf.htm#pages_compref_additional_render_pdf
This lists the best practises for rendering PDFs
How do I generate the debug log?
Forget it, I figured it out. Here it the result of the Debug Log: