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.
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.
To create a Print button, go to: Administration -> Advanced Customisation -> Button Groups
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.
Click on "Customise" next to your new group.
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.