+ Start a Discussion
b.gonzalezb.gonzalez 

VF Page returning no results?

I created a VF page that renders as a 'pdf'. However when I test the VF page with a record, I return no results. I am not sure why.

VF PAGE
<apex:page standardController="Collateral_Development_Request__c" standardStylesheets="false" showHeader="false" sidebar="false" renderAS="pdf">
    <body>
        <apex:stylesheet value="{!URLFOR($Resource.styles, 'styles.css')}" />
        <center><apex:image value="{!URLFOR($Resource.QLogicLogos,'ultimate_logo_horiz_blue_on_white_small.jpg')}"/></center>
        <center><u>
            <apex:outputText value="{!$Organization.Street}" style="font-size:12px"/>&nbsp;&nbsp;&nbsp;&nbsp;
            <apex:outputText value="{!$Organization.City}, {!$Organization.State} {!$Organization.PostalCode}" style="font-size:12px"/>&nbsp;&nbsp;&nbsp;&nbsp;
            <apex:outputText value="{!$Organization.Phone}" style="font-size:12px"/> 
        </u></center>
       <br></br>
        <br></br><center><apex:outputText value="Approved Collateral Development Request" style="font-weight:bold; font-size:22px" /></center><br></br>
        <center><apex:outputText value="Collateral Development Request Detail" style="font-weight:bold; font-size:18px" /></center>
        <br></br><center><b>Approved Request Date:</b> <apex:outputText value="{!NOW()}" style="font-size:14px" /></center><br></br>
        <br></br><br></br>
        <apex:outputText id="name" value="Collateral Development Name: {!Collateral_Development_Request__c.Name}" /><br></br>
        <apex:outputText id="description" value="Collateral Request Description: {!Collateral_Development_Request__c.Collateral_Request_Description__c}" /><br></br>
        <apex:outputText id="status" value="Request Status: {!Collateral_Development_Request__c.Request_Status__c}"/><br></br>
        <apex:outputText id="priority" value="Priority Level: {!Collateral_Development_Request__c.Priority__c}"/><br></br>
        <apex:outputText id="projected" value="Projected Release Date: {!Collateral_Development_Request__c.Projected_Release_Date__c}" /><br></br>
        <apex:outputText id="actual" value="Actual Release Date: {!Collateral_Development_Request__c.Actual_Release_Date__c}" /><br></br>
        <apex:outputText id="theater" value="Theater: {!Collateral_Development_Request__c.Theater__c}" />
        <apex:outputText id="owner" value="Collateral Record Owner: {!Collateral_Development_Request__c.owner.name}" style="font-size:14px" /><br></br>
        <br></br>
        <br></br><center><apex:outputText value="Account Information" style="font-weight:bold; font-size:18px" /></center><br></br>
        <apex:outputText id="company" value="Company: {!Collateral_Development_Request__c.Account__r.name}" /><br></br>
        <apex:outputText id="category" value="Company Category Type: {!Collateral_Development_Request__c.Company_Category_Type__c}" /><br></br>
        <apex:outputText id="othercompanycategory" value="Other Company Category Type: {!Collateral_Development_Request__c.Company_Category_Type__c}"/>
        <apex:outputText id="audience" value="Audience Type: {!Collateral_Development_Request__c.Audience_Type__c}"/><br></br>
        <br></br>
        <br></br><center><apex:outputText value="Contact Information" style="font-weight:bold; font-size:18px" /></center><br></br>
        <br></br>
        <apex:outputText id="requester" value="Requester Name: {!Collateral_Development_Request__c.Requester_Name__c}" /><br></br>
        <apex:outputText id="email" value="Requester Email: {!Collateral_Development_Request__c.Requester_Email__c}" /><br></br>
        <apex:outputText id="phone" value="Requester Phone #: {!Collateral_Development_Request__c.Requester_Phone__c}"/><br></br>
        <br></br>
        <br></br><center><apex:outputText value="Collateral Development Information" style="font-weight:bold; font-size:18px" /></center><br></br>
        <br></br>
        <apex:outputText id="type" value="Collateral Type: {!Collateral_Development_Request__c.Collateral_Type__c}" /><br></br>
        <apex:outputText id="cycle" value="Sale Cycle: {!Collateral_Development_Request__c.Sale_Cycle__c}" /><br></br>
        <apex:outputText id="resource" value="Resource: {!Collateral_Development_Request__c.Resource__c}"/><br></br>
        <apex:outputText id="other" value="Other Resource: {!Collateral_Development_Request__c.Other_Resource__c}"/><br></br>
        <apex:outputText id="lead" value="Lead Gen Value: {!Collateral_Development_Request__c.Lead_Gen_Value__c}"/><br></br>
        <apex:outputText id="product" value="Product: {!Collateral_Development_Request__c.Product__c}" /><br></br>
        <apex:outputText id="location" value="Collateral Location: {!Collateral_Development_Request__c.Collateral_Location__c}" /><br></br>
        <apex:outputText id="collateral" value="Other Collateral Location: {!Collateral_Development_Request__c.Other_Location__c}"/><br></br>
        <apex:outputText id="application" value="Application Category: {!Collateral_Development_Request__c.Application_Category__c}"/><br></br>
        <apex:outputText id="solution" value="Application Solution: {!Collateral_Development_Request__c.Application_Solution__c}"/><br></br>
    </body>
    </apex:page> 
Blake TanonBlake Tanon
what is the URL you're accessing this apge from?
b.gonzalezb.gonzalez
I am not sure what your referring too? When I orginally created the VF page , the fields were rendering results (see image below).
However, I recieved a request to change the layout of the page and now none of the fields are returning results. 

Old Version:
Old Version of VF Page

New Version (fields are not populating with data):
New Version of VF Page
Blake TanonBlake Tanon
does the URL for the new page had an ID in it?  Your old one probably does, that would explain why the new one isn't populating.

https://na9.salesforce..com/apex/yourPageName?id=xxxxxxxxxxxxxxx
b.gonzalezb.gonzalez
Yes it has a id:

https://c.cs30.content.force.com/servlet/servlet.FileDownload?file=00Pn0000000FrLR
Blake TanonBlake Tanon
You're looking at an attachment, not your VF page.  The ID prefix 00P is for attachment files.
b.gonzalezb.gonzalez
Here is the link for the VF page: https://c.cs30.visual.force.com/apex/ApprovedCollateralDevelopmentRequestPDF 
Blake TanonBlake Tanon
try to open it with ?id=  at the end, and put the ID of a Collateral_Development_Request__c record at the end.