0

I have a requirement to create a pdf page in a new window based on dynamicly created records of custom object Incident__c when an User clicks a custom button. Then mail the PDF to the User. Please find my page here. Can someone suggest me here.

Page:

Incident Details for DMs/RMs

Page of

        <apex:outputField style="margin-left:-10px;width:200px;" value="{!Incident__c.Name}"/>
        <apex:outputField style="margin-left:-10px;width:200px;" value="{!Incident__c.Rep_Lookup_id__c}"/>
        <apex:outputField style="margin-left:-10px;width:200px;" value="{!Incident__c.Report_Publish_date__c}"/>
        <apex:outputField style="margin-left:-10px;width:200px;" value="{!Incident__c.Status_abv__c}"/>
        <apex:outputField style="margin-left:-10px;width:200px;" value="{!Incident__c.No_Of_Transactions_abv__c}"/>                                                
    </apex:pageBlockSection>
    </apex:form>
</apex:pageBlock>    
<apex:pageBlock title="Incident Transactions">
    <!--<apex:tabPanel switchType="client">-->

        <!--<apex:tab label="HCP Calls">
        <a href="http://www.tutorialspoint.com" target="_blank">Tutorials Point</a>
        <!--<a href="http://www.tutorialspoint.com" target="_blank">Tutorials Point</a>
        <a href="http://www.tutorialspoint.com" target="_self">Tutorials Point</a>--!-->


       <!-- <apex:tab label="Samples">
        <a href="http://www.tutorialspoint.com" target="_self">Tutorials Point</a>
        </apex:tab>
        <apex:tab label="Speaker Program Attendees">

        </apex:tab>
        <apex:tab label="Synch Rate">

        </apex:tab>                               
    </apex:tabPanel>-->

   <apex:outputPanel layout="none" rendered="{!IF(oIncTranListHCPDetail.size>0, true, false)}">
   <apex:tabPanel >
   <apex:tab label="HCP Calls" >

    <apex:pageBlockTable columns="9" value="{!oIncTranListHCPDetail}" border="true" var="itr" cellPadding="4" >

    <div class="page-break" >
<!-- Your content -->
    </div>
    <apex:column headerValue="Professional Name" style="background-color:#FFFFFF;" value="{!itr.Prof_First_Name_abv__c} {!itr.Prof_Middle_Name_abv__c} {!itr.Prof_Last_Name_abv__c}" />

     <!-- Need to put Profname string here from the map -->
    <apex:column headerValue=" ABS on Call" style="background-color:#FFFFFF;"/>
    <apex:column value="{!itr.Account_Abs_abv__c}" style="background-color:#FFFFFF;"/> 
    <apex:column headerValue=" Professional Address" style="background-color:#FFFFFF;"/>
    <apex:column value="{!itr.Prof_Address_Line1_abv__c}" style="background-color:#FFFFFF;"/> 
    <apex:column headerValue=" Associated Prescriber" value="{!itr.Associated_Prescriber_ID_abv__c}" style="background-color:#FFFFFF;"/>
    <apex:column headerValue=" Product" value="{!itr.Account_Abs_abv__c}" style="background-color:#FFFFFF;"/>
    <apex:column headerValue=" Activity Date" value="{!itr.Account_Abs_abv__c}" style="background-color:#FFFFFF;"/> 
    <apex:column headerValue=" Outcome - LOV" value="{!itr.Outcome_abv__c}" style="background-color:#FFFFFF;"/>



    </apex:pageBlockTable>
    </apex:tab>
    </apex:tabPanel>
    </apex:outputPanel>  


    <apex:outputPanel layout="none" rendered="{!IF(oIncTranListHCPSamples.size>0, true, false)}">
    <apex:tabPanel >
    <apex:tab label="Samples" >
    <apex:pageBlockTable columns="10" value="{!oIncTranListHCPSamples }" border="true" var="itr" cellPadding="4" >
    <apex:column headerValue="Sample Type" style="background-color:#FFFFFF;"  value="{!itr.Prof_First_Name_abv__c}" />
    <apex:column headerValue="Professional Name" style="background-color:#FFFFFF;" value="{!itr.Prof_First_Name_abv__c} {!itr.Prof_Middle_Name_abv__c}  {!itr.Prof_Last_Name_abv__c}" />
    <apex:column headerValue="ABS on Call" style="background-color:#FFFFFF;" value="{!itr.Account_Abs_abv__c}" />
    <apex:column headerValue="Professional Address" style="background-color:#FFFFFF;" value="{!itr.Prof_Address_Line1_abv__c}" />
    <apex:column headerValue="Product" style="background-color:#FFFFFF;" value="{!itr.Prof_First_Name_abv__c}" />
    <apex:column headerValue="Activity Date" style="background-color:#FFFFFF;" value="{!itr.Prof_First_Name_abv__c}" />
    <apex:column headerValue="Quantity (for hand samples, ESR, and DTP/BRC tied to rep)" style="background-color:#FFFFFF;" value="{!itr.Prof_First_Name_abv__c}" />
    <apex:column headerValue="Outcome - LOV" style="background-color:#FFFFFF;" value="{!itr.Outcome_abv__c}" />

    </apex:pageBlockTable>
    </apex:tab>
    </apex:tabPanel>
    </apex:outputPanel>


    <apex:outputPanel layout="none" rendered="{!IF(oIncTranListHCPSpeaker.size>0, true, false)}">
    <apex:tabPanel >
    <apex:tab label="Speaker Program Attendees" >

     <apex:pageBlockTable columns="9" value="{!oIncTranListHCPSpeaker }" border="true" var="itr" cellPadding="4" >
    <apex:column headerValue="Professional Name" style="background-color:#FFFFFF;" value="{!itr.Prof_First_Name_abv__c} {!itr.Prof_Middle_Name_abv__c}  {!itr.Prof_Last_Name_abv__c}" />
    <apex:column headerValue="ABS on Call" style="background-color:#FFFFFF;" value="{!itr.Account_Abs_abv__c}" />
    <apex:column headerValue="Professional Address" style="background-color:#FFFFFF;" value="{!itr.Prof_Address_Line1_abv__c}" />
    <apex:column headerValue="Product" style="background-color:#FFFFFF;" value="{!itr.Prof_First_Name_abv__c}" />
    <apex:column headerValue="Activity Date" style="background-color:#FFFFFF;" value="{!itr.Prof_First_Name_abv__c}" />
    <apex:column headerValue="Program Name, Date and Location" style="background-color:#FFFFFF;" value="{!itr.Prof_First_Name_abv__c}" />
    <apex:column headerValue="Outcome - LOV" style="background-color:#FFFFFF;" value="{!itr.Outcome_abv__c}" />

    </apex:pageBlockTable>
    </apex:tab>
    </apex:tabPanel>
    </apex:outputPanel>

    <apex:outputPanel layout="none" rendered="{!IF(oIncTranListSynch.size>0, true, false)}">
    <apex:tabPanel >
    <apex:tab label="Synch report">

     <apex:pageBlockTable columns="6" value="{!oIncTranListSynch}" border="true" var="itr" cellPadding="4" >
    <apex:column headerValue="Date of Previous Synchronization" style="background-color:#FFFFFF;" value="{!itr.Date_of_Prev_Sync_abv__c}" />
    <apex:column headerValue="Date of Last Synchronization" style="background-color:#FFFFFF;" value="{!itr.Date_of_Last_Sync_abv__c}" />
    <apex:column headerValue="Days between Synchronization" style="background-color:#FFFFFF;" value="{!itr.Days_bwn_Sync_abv__c}" />
    <apex:column headerValue="Outcome - LOV" style="background-color:#FFFFFF;" value="{!itr.Outcome_abv__c}" />

    </apex:pageBlockTable>
    </apex:tab>
    </apex:tabPanel>
    </apex:outputPanel>

    <apex:outputPanel layout="none" rendered="{!IF(oIncTranListHCI.size>0, true, false)}">
    <apex:tabPanel >
    <apex:tab label="HCI/HCO Calls" >

     <apex:pageBlockTable columns="10" value="{!oIncTranListHCI}" border="true" var="itr" cellPadding="4" >
    <apex:column headerValue="Account Name" style="background-color:#FFFFFF;" value="{!itr.Account_Name_abv__c}" />
    <apex:column headerValue="ABS on Call" style="background-color:#FFFFFF;" value="{!itr.Account_Abs_abv__c}" />
    <apex:column headerValue="Account Address" style="background-color:#FFFFFF;" value="{!itr.Account_Location_abv__c}" />
    <apex:column headerValue="Attendee Name" style="background-color:#FFFFFF;" value="{!itr.Prof_First_Name_abv__c}" />
    <apex:column headerValue="Attendee Role" style="background-color:#FFFFFF;" value="{!itr.Attendee_Role_abv__c}" />
    <apex:column headerValue="Detail" style="background-color:#FFFFFF;" value="{!itr.Prof_First_Name_abv__c}" />
    <apex:column headerValue="Activity Date" style="background-color:#FFFFFF;" value="{!itr.Prof_First_Name_abv__c}" />
    <apex:column headerValue="Outcome - LOV" style="background-color:#FFFFFF;" value="{!itr.Outcome_abv__c}" />

    </apex:pageBlockTable>
    </apex:tab>
    </apex:tabPanel>
    </apex:outputPanel>


    <apex:outputPanel layout="none" rendered="{!IF(oIncTranListPharmacy.size>0, true, false)}">
    <apex:tabPanel >
    <apex:tab label="Pharmacy Calls" >

     <apex:pageBlockTable columns="10" value="{!oIncTranListPharmacy}" border="true" var="itr" cellPadding="4" >
     <div class="page-break" >
<!-- Your content -->
     </div>
    <apex:column headerValue="Account Name" style="background-color:#FFFFFF;" value="{!itr.Account_Name_abv__c}" />
    <apex:column headerValue="ABS on Call" style="background-color:#FFFFFF;" value="{!itr.Account_Abs_abv__c}" />
    <apex:column headerValue="Account Address" style="background-color:#FFFFFF;" value="{!itr.Account_Location_abv__c}" />
    <apex:column headerValue="Attendee Name" style="background-color:#FFFFFF;" value="{!itr.Prof_First_Name_abv__c}" />
    <apex:column headerValue="Attendee Role" style="background-color:#FFFFFF;" value="{!itr.Attendee_Role_abv__c}" />
    <apex:column headerValue="Detail" style="background-color:#FFFFFF;" value="{!itr.Prof_First_Name_abv__c}" />
    <apex:column headerValue="Activity Date" style="background-color:#FFFFFF;" value="{!itr.Prof_First_Name_abv__c}" />
    <apex:column headerValue="Outcome - LOV" style="background-color:#FFFFFF;" value="{!itr.Outcome_abv__c}" />

    </apex:pageBlockTable>

    </apex:tab>
    </apex:tabPanel>
    </apex:outputPanel>

</apex:pageBlock>  

Getting below error:

No operation available for request {http://soap.sforce.com/schemas/package/IncidentDetailExtnController2}send

2
  • 1
    What is the problem that you're facing?
    – Sam
    Commented Nov 24, 2014 at 9:37
  • Hi theGreatDanton! I have placed a command button in the detail page that can show the PDF. I need basically two action from the command button. The second one is to do mailing to particular mail address. That I am unable to do Commented Nov 24, 2014 at 11:42

0

You must log in to answer this question.

Browse other questions tagged .