Add a print button in the company screen - sage-crm

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.
Add the button to the list and click "Save". You should now have a Print button on the Company Summary screen.

Related

jump to section not working in elemetor wordpress

I am using elementor on wordpress. I want it such that went I click a button it should take me to a certain section. I have followed the steps correctly but the issue is, when I click the button it doesnt scroll to any sections
what I did is... I have given my section a ID, and then passed the ID in my link field like so "#ID"
but when I click the button it doesnt jump to the section.
when I copy the link address on that button and paste it in a new tab it takes me to my desired section.
my site is: https://getjoystik.com/
the button is the first button on the page "SCROLL TO PRE-ORDER"

How to make pop-up data reflect selected record?

The case:
I have Activities as datamodel.
I have set Activities to have many-to-many relationship with themselves to represent a Parent / Child relationship.
I have set up an accordion widget. Each row of the accordion contain basic data about the Activity record + some buttons.
I have set one of the button's onClick functions to open a popup, which allows me to edit the Activity detail in a form.
When I click a different record from the same accordion, the form from the popup reflects the data in the selected record.
The problem:
I have nested accordions which represent the "Child" Activities of the Parent Activity.
I have also added a similar button, which opens a popup. I can open the popup, which targets the child records, but cannot make it open the specific record, from which I pressed the button.
So the popup open by default on the first child.
Please help - how can I make the popup change naturally to reflect the datasource / selected record of even nested datasources?
What I tried:
In order to try and make to popup work I have tried to set the datasource based on the relationship:
Activities: Sub_Activities(relation)
This works to the extent of showing the related items, but popup content does not dynamically change on clicking a different child record or clicking the button from a different child record.
In both cases what is shown is the first child record.
What I understand is that you have a set up in which you click a button and a popup shows. The popup should let you view/edit the record referenced in the row where the button is. If that is the case, then probably you already have almost everything setup for the next thing to work. First, add a string custom property to the popup and name it selectedKey. Then, on the onClick event of the button that opens the popup, add something like this:
var key = widget.datasource.item._key;
app.popups.MYPOPUP.properties.selectedKey = key;
app.popups.MYPOPUP.visible = true;
Now, go to the popup content and add the following on the onAttach event handler:
var key = widget.root.properties.selectedKey;
widget.datasource.selectKey(key);
This is the general idea of how to make it work; However, in order for it to work, your datsources in the widgets should be properly set up. Good luck!

How to remove long description navigation from MessageItem control

I'm creating a message popover that acts as a chat window (See image below)
By default, if the MessageItem control has a text description that is larger than the window, the user can click on the message and UI5 will use a slide navigation to show the complete description. Here is a sample from the docs of this behavior (click on the information button on the bottom of the sample)
Rather than navigate the user to a long description view, I want to simply wrap any long text description to the next line. Is there a way to implement this functionality? I know this is possible with pure CSS, but I don't want to fight the out of box UI5 control if there is a cleaner way of doing this?
Edit: The code is pretty generic
this.oMessageItemTemplate = new MessageItem({
type: "{namedModel>type}",
title: "{namedModel>message}",
description: "{namedModel>description}",
longtextUrl: "{namedModel>longtextUrl}"
});

Add Create Task Radio Button in Calendar Module-suiteCRM?

I am new to suiteCRM and i need some help.When I want to add any activity(like Task,Meeting or Call) in calendar module,When I click on any time period then quick create popup is displays and it is showing two radio button "Schedule Meeting" and "Log Call" but it is not showing "Create Task" Which I want.
Is there any option in admin panel or config that allow us to enable crate task?
I have attached a screenshot for reference.
Thanks in advance.enter image description here
There is not an admin option per se.
In order to add tasks in that view, you would need to add the checkbox in modules/Calendar/tpls/form.tpl and include your own custom javascript to handle this.

What is the proper name for a multibutton?

I'm trying to design a UI in Qt and I can't find anywhere in the designer a button which can be "droped down" like combobox. What I mean by that is that I would like to have this button with his "default" option choosen so if I like it I would have to just click on it but if I would like to choose different option I would be able to clik the little arrow on the right side of this button and then pick option suitable for me at that moment.
You're looking for a QToolButton that has a set of actions or a menu set on it. From the documentation, the QToolButton::ToolButtonPopupMode...
Describes how a menu should be popped up for tool buttons that has a menu set or contains a list of actions.
Of it's values, the two that I see most frequently are DelayedPopup:
After pressing and holding the tool button down for a certain amount of time (the timeout is style dependant, see QStyle::SH_ToolButton_PopupDelay), the menu is displayed. A typical application example is the "back" button in some web browsers's tool bars. If the user clicks it, the browser simply browses back to the previous page. If the user presses and holds the button down for a while, the tool button shows a menu containing the current history list
And MenuButtonPopup:
In this mode the tool button displays a special arrow to indicate that a menu is present. The menu is displayed when the arrow part of the button is pressed.

Resources