Add a print button in the company screen

467 Views Asked by At

I want to add a button in my screen company in Sage CRM, but when I add this script it doesn't work

<script>crm.ready(function() { crm.addButton('print'); });

I added this script in the companyTopContent.

1

There are 1 best solutions below

0
Six Ticks Limited On BEST ANSWER

The reason this didn't work is probably because you are using a version prior to 7.2 and, therefore, CRM is not defined in the custom content.

However, there is quite a simple way to add buttons to the Company Summary screen without resorting to adding JavaScript (although JavaScript buttons can be useful sometimes).

Sage has built-in "Button Groups" that allow a collection of buttons to be created and then attached to various parts of the system, one of which is the Company Summary screen.

  1. To create a Print button, go to: Administration -> Advanced Customisation -> Button Groups

  2. Click on "New" and enter a name. Select "companysummary" for the Action. This will create the button group and take you back to the button group screen.

  3. Click on "Customise" next to your new group.

  4. Add a new button:

Caption: Print
Action: customurl URL Name: javascript:window.print()
Bitmap: print.gif
New Window: No - this is important, otherwise you will be printing a blank page.

  1. Add the button to the list and click "Save". You should now have a Print button on the Company Summary screen.