You need to sign in to do that
Don't have an account?
Dhairya Mistry
Adding Child Object's fields on Parent Object's PDF view via VisualForce.
Hi,
Reltively new to VF and Apex. I have two custom objects - ObjectA__c (Parent Object), ObjectB_Line_Item__c (Child Object) connected via Master-Detail. I have created a button on Object A for rendering as PDF. I have ObjectB_Line_Item__c as related list on ObjectA__c.
I need to create a table of line items of ObjectB_Line_Item__c on ObjectA__c.
I used <apex:related list> as follows and was able to get the list but I need only few columns on the PDF instead of all columns I see on ObjectA__c related list. In short default view of related list is not ideal and I have not been able to find how to hide few columns in PDF while keeping current related list on ObjectA__c detail page as it is.
The objects are similar in behavior as Opportunity and Opportunity Line Item. Appreciate your help.
Reltively new to VF and Apex. I have two custom objects - ObjectA__c (Parent Object), ObjectB_Line_Item__c (Child Object) connected via Master-Detail. I have created a button on Object A for rendering as PDF. I have ObjectB_Line_Item__c as related list on ObjectA__c.
I need to create a table of line items of ObjectB_Line_Item__c on ObjectA__c.
I used <apex:related list> as follows and was able to get the list but I need only few columns on the PDF instead of all columns I see on ObjectA__c related list. In short default view of related list is not ideal and I have not been able to find how to hide few columns in PDF while keeping current related list on ObjectA__c detail page as it is.
<apex:relatedList list="ObjectB_Line_Items__r" title=""/>
The objects are similar in behavior as Opportunity and Opportunity Line Item. Appreciate your help.
You might need to write a custom controller or an extension. Then you can run a query, and use it in your VF page. Have you explored that route?
Of course, you might have to adjust your list attribute name and the field names, but this should get you close.
Here is some information: http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller.html (#)