• Graham Booth 11
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Is there any way of creating a basic Code Coverage Class to allow me to move the changes to Production?

The visualforce page I have is simply to have an output in PDF format.  There is no record update or inserts.  Is there anyway of creating somewhich will allow me to push the code to Production

thanks
I am new to apex development and am struggling outputting data from the Parent and Child objects in a PDF format.  I have completed the output of data from the Parent Account and the related lists, but would like to be able to control the fields which appear from the child objects.

Below is the code that I have created.  The lines in Bold is where i am getting stuck.  The Related list code does work, but just dumps everythin from the related list.  The other bold line is not working an I cannot figure out why it cannot refernce the child object.

Any help would be appreciated.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<apex:page standardController="Patient__c" renderAs="pdf">

    <apex:stylesheet value="{!$Resource.pdfStyle}"/>
    <center>
        <h1>COMPANY Patient Form</h1>
    </center>

    <table align="center" style="border: 1px solid #6699CC;">
        <tr>
            <td style="background-color: #6699CC; color: #FFFFFF; font-size: 100%; padding: 10px;">Patient Details</td>
        </tr>
        
    <pre></pre>
    <tr>
        <apex:form >
            <apex:pageBlock >
                <apex:panelgrid columns="1">
                    <apex:OutputText value="Name: {!Patient__c.First_Name_s__c} {!Patient__c.Family_Name__c}"/>
                    <apex:OutputText value="Date Of Birth: {!Patient__c.Date_Of_Birth__c}"/>
                    <apex:OutputText value="Gender: {!Patient__c.Gender__c}"/>
                </apex:panelgrid>
            </apex:pageBlock>
        </apex:form>
    </tr>
    </table>

    <table align="center" style="border: 1px solid #6699CC;">
        <tr>
            <td style="background-color: #6699CC; color: #FFFFFF; font-size: 100%; padding: 10px;">Weighing Details</td>
        </tr>    
    <pre></pre>
    <apex:relatedList list="Patient_Weights__r" />
    <tr>
        <apex:form >
            <apex:pageBlock >
                <apex:pageBlockSection columns="1">
                    <apex:OutputField value="{!Patient_Weights__r.Name}"/>
                </apex:pageBlockSection>
            </apex:pageBlock>
        </apex:form>
    </tr>
    </table>
    
</apex:page>
Is there any way of creating a basic Code Coverage Class to allow me to move the changes to Production?

The visualforce page I have is simply to have an output in PDF format.  There is no record update or inserts.  Is there anyway of creating somewhich will allow me to push the code to Production

thanks