You need to sign in to do that
Don't have an account?
Custom Related Lists on PDF VF
I'm trying to build a printable PDF for records of a Custom Object, as well as the related child objects (also custom objects). I found this thread http://boards.developerforce.com/t5/Visualforce-Development/Rendering-mutiple-records-with-related-lists/m-p/272751/highlight/false#M34985 but I'm not sure how to implement it. I'm still in the early stages of building, so everything is super basic right now.
Here's my VF
Not sure where I went wrong or what other information to provide. TIA.
Here's my VF
<apex:page standardController="Demo_Request__c" renderAs="pdf"> <body> <div id="account-info"> <apex:panelGrid columns="2" width="100%"> Account:<apex:outputText value="{!Demo_Request__c.Account__r.Name}"/> Owner: <apex:outputField value="{!Demo_Request__c.Owner.Name}"/> </apex:panelGrid> </div> </body> </apex:page>I'm great with clicks - not so much with the code. I added this apex class in as an extension to my VF (along with modified code from the thread I linked above) and I got errors. Here's the class as I modified it - throwing an error on line 5 - guessing I plugged the wrong thing in to that last get.
public with sharing class DemoRequest { public Demo_Request__c oList{ get; set; } public DemoRequest () { String demoRequestQueryId = (String[])ApexPages.currentPage().getParameters().get('demorequest'); String soqlQuery = 'select id, Name from Demo_Request__c'; oList= Database.query(soqlQuery); } }
Not sure where I went wrong or what other information to provide. TIA.
use the below code and on line below use the Child Relationship Name instead of Custom_relation__r. Go to child custom object and clicko n the lookup/master detail relation of the parent object and the copy Child Relationship Name and concatenate __r