You need to sign in to do that
Don't have an account?
Shiv Shankar
Related List Values are not coming
Hi Friends,
I have written a VF Page
<apex:page standardController="Request__c" standardStylesheets="false" showHeader="false" sidebar="false"> <html> <head> <apex:stylesheet value="{! URLFOR($Resource.Src, 'Src/css/all.css')}"/> <apex:stylesheet value="{! URLFOR($Resource.Src, 'Src/css/jcf.css')}"/> <style> .requests-table{ border-collapse:collapse; width:590px; border:1px solid #e5e5e5; margin:0 0 14px; } .requests-table th, .requests-table td{ background:#f5f5f5; font:bold 12px/14px Arial, Helvetica, sans-serif; color:#5b5b5b; width:105px; padding:0 5px 0 10px; height:25px; border-left:1px solid #fff; text-align:center; } .requests-table th:first-child{border:none;} .requests-table th.col-last, .requests-table td.col-last{width:auto;} .requests-table td{ background:none; height:26px; border:1px solid #e5e5e5; font-weight:normal; color:#8e8e8e; padding:3px 5px 0 10px; } .requests-table td.col-last{ text-align:center; font:bold 24px/26px Arial, Helvetica, sans-serif; color:#8e8e8e; padding:3px 27px 0 10px; height:26px; } td, th { text-align:center; border:1px solid #e5e5e5; } </style> </head> <body> <div style="background-color:#ffffff"> shiv - {! $CurrentPage.parameters.id} <apex:image style="text-align:left" url="https://c.cs10.content.force.com/servlet/servlet.ImageServer?id=015J00000005plL&oid=00DJ0000001HSJK&lastMod=1364884170000"/><br/> <p>Dear {! $CurrentPage.parameters.firstName} {! $CurrentPage.parameters.lastName}</p> <p>You placed a request through Givaudan Direct/Connect on <apex:outputText value="{0,date,MM'/'dd'/'yyyy}"><apex:param value="{! Request__c.CreatedDate}"/> </apex:outputText>. Here is the details of your request: </p> <table class="requests-table"> <thead> <th> Item Nb </th> <th> Description </th> <th> Sales Nb </th> <th> Sample </th> <th> Quote </th> <th> Regulatory Doc </th> </thead> <tbody> <apex:variable var="itemNum" value="{! 01}"/> <apex:repeat value="{! Request__c.Items_Requests__r}" var="recc"> <tr> <td> {! itemNum} - {! Request__c.Items_Requests__r[0].Sample__c } </td> <td> {!recc.Description__c} </td> <td> {!recc.Sales_Nb__c} </td> <td> {!recc.Sample__c} </td> <td> {!recc.Quote__c} </td> <td> {!recc.Regulatory_Document__c} </td> </tr> <apex:variable var="itemNum" value="{! itemNum+1}"/> </apex:repeat> </tbody> </table> <p>We would also like to thank you for your interest for your trust and confidence in Givaudan and our products. With our best regards,</p> <p>GivaudanDirect/Connect team</p> </div> </body> </html> </apex:page>
Not conten of this VF Page i am geeting in Apex Class with following way
PageReference CustomerEmailTemplatee = Page.CustomerEmailTemplate; CustomerEmailTemplatee.getParameters().put('id',request.id); CustomerEmailTemplatee.getParameters().put('firstName','TestFirstName'); CustomerEmailTemplatee.getParameters().put('LastName','TestLastName'); Blob body; body = CustomerEmailTemplatee.getContent(); system.debug('Html Content ----'+body.toString());
Problem : I am not getting values for related list of Request__c .