Edit Mail Grid

Hello, I just receive a SuiteCRM in production. This is my first time with this software. I was asked to able the admin user to delete messages. What I’m trying to do is add a column with checkboxes in the email list grid, and add a button to delete selected checkboxes.

Versión: 6.5.20
Theme: Default

Until now, I was able to add the button and the header of the column for checkboxes.

I need help with this:

  1. Where is the file/function in charge of generate the list, in order to add the checkbox?
  2. Where is the best place to check if the user is admin, to display the button?
  3. Is there a defined SuiteCrm functions to handle email deletion?

Notes:

  • Button was added in modules/Emails/templates/_baseEmail.tpl
  • Column header was added in modules/Emails/javascript/grid.js

Attached image to show what I’m done until now

Thanks in advance.

I am not sure but you may be able to achieve it with a widget_class.

If you search the code you will find them being used in subpanels to achieve exactly what you are trying to do but in other modules.

There are certain recurrent widget_class es used in many of the standard subpanels:
SubPanelTopButtonQuickCreate
SubPanelTopSelectButton
SubPanelCheck

Additionnally I believe that you can create your own widget classes.

For example the (formerly custom) module FP_events has additional custom widgtes like:
SubPanelDelegatesSelectButton
SubPanelManageDelegatesButton
SubPanelManageAcceptancesButton
SubPanelSendInvitesButton
SubPanelCheck
SubPanelTopFilterButton

I repeat: maybe this has nothing to do with your requirement.

1 Like

I will check if what you propose work for me and let you know later.

Thank you for replay.

Note that this screen has changed in 7.9.x and the customizations you are making now won’t apply after that version…

I really think you would be better off thinking of a solution for the newer versions.