- Tue Feb 17, 2015 3:34 am
#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
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 (25.67 KiB) Viewed 4575 times