How to set a filter in Meetings Add Invitee / Participants "Show More" Script?

Hello everyone,

I am slowly but surely despairing of a relatively simple requirement:

In the Meetings module, I would like to trigger the function for adding a participant. The meeting is already connected to a parent account and when I use the “Show More” function (see screenshot), the list view of the contacts opens.


Requirement: If the module Contacts has been selected, then only the contacts of the account that is linked to the meeting as a parent should be displayed. If Leads or Users have been selected as the selection module, no filters should be set.

I have not yet found a sensible solution, but I know that these functions in particular play a role here:

/clients/base/fields/participants/participants.js
/include/javascript/sugar7/plugins/SearchForMore.js

Do you have any ideas or experience on how to implement this?

I look forward to your feedback

Kind regards

Martin Neitzke

- IT Applications-

AVM GmbH

  •   

    I have had a look and can see that the drawer for the guests is using the base `selection-list-module-switch` layout. I had a quick play on my local machine and by overriding the render method I was able to get a basic working concept to apply custom filter options when it is processing the Contacts module, though it would need more adding to handle if in create or record view which I didn't bother about as I just wanted to check the concept works. For reference it uses the filter options in `this.context.get('filterOptions')` so that is where you will want to set your bespoke filters when necessary.

    The below link should assist in adding filters to a drawer in JS if you are not familiar with it.

    support.sugarcrm.com/.../

    I hope that helps with that part. I didn't look into the quicksearch on the relate field side but from your post I presumed you were only interested in the actual drawer itself.