0

when i select the records in vf page ,after click on the VF Button the conga should be call along with id for generating the PDF but on button click the window is opening but showing error that "ID Parameter is missing" ?

VF Page:

<apex:commandButton value="Generate Invoice" action="{!GenerateInvoice}"  onclick="openConga()" reRender="table1"/>

<Script Language="JavaScript"> 
             function openConga() 
                { 
                    window.open('{!URLFOR($Action.Payment__c.Generate_PDF, Payment_Id)}', '','scrollbars=yes,menubar=no,height=600,width=800,resizable=yes, toolbar=no,location=yes,status=yes');

        </Script>  

Controller:

public PageReference GenerateInvoice() 
            {
            selectedEsr = new List<Payment__c>();
            for(wrappayment wp : paymentList)
                {
                    if(wp.selected == true) 
                    {  Payment_Id=wp.pay.id; 
 }
        }

        return null;
            }  

marked as duplicate by David Reed apex Jan 28 at 14:00

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • [‎28-‎01-‎2019 12:44] Sakhare, Ankita: using command ::<apex:commandButton value="Generate Invoice" action="{!GenerateInvoice}" onclick="openConga()" reRender="table1"/> – hari Jan 28 at 8:23
0

In which page does the error appear? Based on the codes you have given, the error should be somewhere between here {!URLFOR($Action.Payment__c.Generate_PDF, Payment_Id)}, did you try to debug the Payment_Id parameter and see if it is empty?

  • ..error is on the cong page – hari Jan 29 at 5:50

Not the answer you're looking for? Browse other questions tagged or ask your own question.