How to include print as pdf for the cases module?

Hi team,

I’ve noticed that the “Print as PDF” action is not available in the Cases module.

I attempted to add the Cases module to PDF Templates, but the option still doesn’t appear on the case record view.

Could anyone please advise on how to enable this in SuiteCRM 8.8 ?

This is for SuiteCRM v7s, but I hope it will work for v8 too.

You would find more topics in this forum related to it.

1 Like

For Suite8, you’d need to do two things as a workaround to get the V7 PDF function working:

  1. The legacy.module_routing - see Compatibility mode in suitecrm 8?
  2. The PDF functionality as before in SuiteCRM 7 - see Print pdf in custom module and @rsp links.

It’s a bit of a workaround unfortunately, but it’s working smoothly.

There is most likely a (probably undocumented currently) way to use SuiteCRM 8 UI for that. Maybe you’ll find some hints here: Front-end :: SuiteCRM Documentation - if not, the “documentation” is the current code, so it’ll take some time to figure things out.

1 Like

Its not something I have tried but the pure Suite8 way of doing it would follow this guide here:

(the first bit at least), the follow up to that is to look at the accounts detailviewdefs.php and “copy” the recordaction section:

 'recordActions' => [
          'actions' => [
              'print-as-pdf' => [
                  'key' => 'print-as-pdf',
                  'labelKey' => 'LBL_PRINT_AS_PDF',
                  'asyncProcess' => true,
                  'modes' => ['detail'],
                  'acl' => ['view'],
                  'aclModule' => 'AOS_PDF_Templates',
                  'params' => [
                      'selectModal' => [
                          'module' => 'AOS_PDF_Templates'
                      ]
                  ]
              ]
          ]
      ],

This would go in your cases detailviewdefs.php file so copy the detailviewdefs.php file to the appropriate location in custom and then add this section of code. Ensure you have a case template set up (you’ve done that).

Thats obviously two different ways to do the same thing (just in case that wasnt clear), basically you need to add the menu item to the recordActions section to get it to appear for cases.

Regards

Mark

1 Like

I tried the method you suggested by adding the “recordAction” section to the custom details view, and it worked, the ‘Print as PDF’ option now appears in the Cases module. I just need to resolve a few issues with some values not displaying.

Thank you!

Could you please share your complete solution? It will help everyone in the forum.
@Shatha