Share ideas, ask questions, and get feedback about developing for ProcessMaker
Forum rules: Please post new questions under "Developing processes & programming" for ProcessMaker 2 or 3.
#781983
Hi All,
I have created output Document and linked with dyna form but when i clicked this link it show me error "Error: Unable to find Output Document for Case".


I have run this query "SELECT * FROM APP_DOCUMENT WHERE APP_UID='51989203254e2d9f518eae9028061160' AND DOC_UID='11368255654e2c1cc8afe87032627627'";
it 's give an empty result set.


I have attached my output document property image.


here is my trigger code

$docId='11368255654e2c1cc8afe87032627627';
$caseId = @@APPLICATION;

// echo "SELECT * FROM APP_DOCUMENT WHERE APP_UID='$caseId' AND DOC_UID='$docId'";
//die();

$result = executeQuery("SELECT * FROM APP_DOCUMENT WHERE APP_UID='$caseId' AND DOC_UID='$docId'");

if (is_array($result) and count($result) > 0) {
$docId = $result[1]['APP_DOC_UID'];
@@OutDocURL = "../cases/cases_ShowOutputDocument?a=$docId&ext=pdf";
@@OutDocLabel = 'Open Output Document';
}
else {
die("Error: Unable to find Output Document for Case.");
}



and here is my javscript code

getField("OutDocLink").href = getField("OutDocURL").value;
getField("OutDocLink").innerHTML = getField("OutDocLabel").value;
getField("OutDocLink").target = "_blank";


please help me.

Thanks

Pratyush
Attachments
OutputDucument1.png
OutputDucument1.png (25.67 KiB) Viewed 4575 times
#782106
Did you assign the Output Document as a step that is executed before that trigger is fired?

If the trigger is fired after the Output Document step, then try moving the trigger to fire before the next step or in the next task. The problem might be that the database hasn't been updated yet when the trigger is fired. Also, open the wf_<WORKSPACE>.APP_DOCUMENT table and run a case. See whether a record is add to the table.
#782825
Thanks Amosbatto,

It's too late to give the solution for this problem.

I have already solved this problem and i have already done these steps which you write here.

When i post any problem then i'm expecting the community member that they help me as soon as possible but didn't get any help from anyone now I'm totally desperate.


Thanks Amosbatto for your help.



Thanks
Pratyush

A 1xBet clone script is a customizable software so[…]

A Bustabit clone script is a pre-made software sol[…]

Are you looking for ways to pay someone to write m[…]

BC.Game Clone

BC.game clone is a replica of the original BC.game[…]