- Wed Nov 29, 2017 7:11 am
#807391
Dear All,
Can anyone help please,
I have the following trigger code
I have tried to do it for one single row of the main foreach loop by applying break;
Have also tried removing the loop altogether and run this code for only one row, but it is always giving this error.
The output document works fine otherwise.
Can someone please help what's wrong with the code.
I saw a post in Processmaker 2.x group that PMFGenerateOutputDocument() had a bug, is that fixed in version 3.x or I am hitting the same bug, If yes what could be the workaround for this.
Please help soon.
Best regards,
Satya
Can anyone help please,
I have the following trigger code
Code: Select all
I have tried to generate this output document in all possible ways, but its always giving an error This row doesn't exist!if(is_array(@=supplierList)){
foreach(@=supplierList as $row){
@@SupplierID = $row["SUPPLIERID"];
if(isset($row["ADDRESS"]) && $row["ADDRESS"]!="")
@@ADDRESS_OR_NAME = $row["ADDRESS"];
else
@@ADDRESS_OR_NAME = $row["SUPPLIERNAME"];
@@extSupplierName = $row["SUPPLIERNAME"];
@@todayDate = getCurrentDate();
@@gridInvoiceDetail = executeQuery("SELECT ROWID, CASENUMBER, AMONTORAVAL, PRODUCTFAMILY,
SUPPLIERID, SUPPLIERNAME, PROCUREMENTCODE, DIVISIONID, DIVISIONNAME,
PLATEFORME AS DAPLATEFORME,
EAN, DESIGNATIONARTICLE, VA, PROMORPERM AS DPROMORPERM, CODERUPTURECOMMANDE,
CODERUPTURELIVRAISON, DATELIVR, NOCDE, RELIQUAT, QTECDEE, QTELIVREE, ECARTCDELIVRE,
MONTANTCDEHT, MONTANTLIVREHT, MONTANTRUPTUREHT, MONTANTPENALITEHT, AEXCLURECAUSECORA,
MONTANTAFACTURERPOTENTIEL, MONTANTAFACTURERBRUTINCLUANTLESRUPTURESENCODES0ET8,
ECARTBRUTENETTE FROM pmt_invoicesdetaildata Where
SUPPLIERID='".$row["SUPPLIERID"] ."' AND CASENUMBER=".@@APP_NUMBER);
@@docID = "9623107915a094870dc75e4077532863";
@@varToSend = array('ADDRESS_OR_NAME' => @@ADDRESS_OR_NAME,
'SUPPLIERID' => @@SupplierID,
'todayDate' => @@todayDate,
'gridInvoiceMaster1' => $row,
'gridInvoiceDetail1' => @=gridInvoiceDetail);
@@sendRetVal = PMFSendVariables(@@APPLICATION,@@varToSend);
PMFGenerateOutputDocument(@@docId,@@APPLICATION);
}
}
I have tried to do it for one single row of the main foreach loop by applying break;
Have also tried removing the loop altogether and run this code for only one row, but it is always giving this error.
The output document works fine otherwise.
Can someone please help what's wrong with the code.
I saw a post in Processmaker 2.x group that PMFGenerateOutputDocument() had a bug, is that fixed in version 3.x or I am hitting the same bug, If yes what could be the workaround for this.
Please help soon.
Best regards,
Satya