From 2aa1b31926036a5ea40de4f9802e5c700a115f95 Mon Sep 17 00:00:00 2001 From: Muhammad Shahrukh <> Date: Wed, 4 Sep 2024 17:52:48 +0500 Subject: [PATCH] COMCL-792: fix pdf creation for cases --- CRM/Civicase/Hook/BuildForm/HandleDraftActivities.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CRM/Civicase/Hook/BuildForm/HandleDraftActivities.php b/CRM/Civicase/Hook/BuildForm/HandleDraftActivities.php index 8205aeb8e..4dc8354e7 100644 --- a/CRM/Civicase/Hook/BuildForm/HandleDraftActivities.php +++ b/CRM/Civicase/Hook/BuildForm/HandleDraftActivities.php @@ -149,6 +149,10 @@ private function addSaveDraftButton(CRM_Core_Form &$form, $formName) { $form->setDefaults($draft); } } + $caseId = CRM_Utils_Request::retrieve('caseid', 'String'); + if ($formName === self::PDF_LETTER_FORM_NAME && !empty($caseId)) { + $form->addElement('hidden', 'caseid', $caseId); + } } /**