Skip to main content
Olga Kim (Olga Kim) ha fatto una domanda in #Visualforce
Is it possible to create a PDF Page that contains values from three related objects?

If it is, how would I do that? 

Thank you, in advance!
2 risposte
  1. 12 ago 2020, 05:12
    Hi Olag,

    I think you can have an soql to get the records from related objects using the relationship between them and below is the link to them "https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_relationships_query_limits.htm⌗:~:text=No%20more%20than%2020%20parent,Account."

    Additionally I also found a simple example with contact records in visualforce page as pdf.

    Link: https://developer.salesforce.com/forums/?id=906F00000008oVEIAY

    <apex:page renderAs="PDF" standardController="Account">

    <apex:pageBlock>

    <apex:pageBlockSection>

    <apex:pageBlockTable value="{!Account.Contacts}" var="con">

    <apex:column value="{!con.Name}" />

    </apex:pageBlockTable>

    </apex:pageBlockSection>

    </apex:pageBlock>

    </apex:page>

    I hope this helps and in case if this comes handy can you please choose this as best answer so that it can be used by others in the future.

    Regards,

    Anutej
0/9000