Hello everyone. Can someone tell me how to filter the list of emails address via Account? That is displayed when registering email sending activity via the Section Actions toolbar. Found a similar article https://community.creatio.com/questions/filter-contact-list-section-act….  Thanks!

Like 0

Like

3 comments

Hello Serhii,
Thank you for your question.

I have tried to use a similar approach to the one mentioned in the forum discussion. Here is an example of how to filter recipients to contain 'mycompany' in the email address in the action dashboard of the contacts section.


define("EmailMessagePublisherPage", ["LookupUtilities"],
       function(LookupUtilities) {
           return {
               entitySchemaName: "Activity",
               mixins: {},
               attributes: {},
               methods: {
                updateLookupFilter: function(lookup) {
                  lookup.config.updateViewModel = function() {
                    this.pushSelectFilters = function(select) {
                      const filters = select.filters;
                      const lookupInfo = this.getLookupInfo();
                      if (!lookupInfo.columnValue) {
                        const searchColumn = this.get("searchColumn");
                        if (searchColumn) {
                          const columnPath = searchColumn.value;
                          const stringComparisonType = this.getStringColumnComparisonType();   
                          const filter = select.createColumnFilterWithParameter(stringComparisonType, columnPath,
"mycompany");
                          filters.add("searchDataFilter", filter);
                        }
                      } else {
                        lookupInfo.columnValue = null;
                      }
                    }
                  };
                },
                openRecepientLookupEmail: function() {
                  var lookup = this.getLookupConfig("Recepient");
                  
                    this.updateLookupFilter(lookup);
                  
                  lookup.config.actionsButtonVisible = false;
                  var searchValue = this.get("RecepientLookupSearchValue");
                  if (searchValue) {
                    lookup.config.searchValue = searchValue;
                  }
                  LookupUtilities.Open(this.sandbox, lookup.config, lookup.callback, this, null, false, false);
                },
              },
               diff: /**SCHEMA_DIFF*/[]/**SCHEMA_DIFF*/
           };
       });

Hope this helps!

Hello. Thank you. The solution works, but it is not ideal. It is necessary to check the Account domain, or there may be employees who have a Gmail email. I am looking for another solution.

Hello Serhii,

The example I provided serves as a foundation for adding email address filtering for the action dashboard. You can use this example as a base and modify the filtering logic according to your preferences.

Hope this helps

Show all comments

Hi community,

I have 3 specified dates  (days are calculated from the start date) in the future. I want to send e-mail from the process exactly on that dates. How can I do it?

Like 0

Like

2 comments

Hi Jana,

 

It's better (and easier) to create two separate processes with the following logic:

 

1) The first process will calculate the exact date when the email should be sent. The date when the email should be sent will be stored in the hidden column on the record page from which the data for email should be taken.

 

2) The second process will have a "Timer" start signal that will be triggered once per hour (for example) and read records from the section that meet the following condition: SendDate for the email = Day.Today. If there are such records the process will send an email.

 

Using the process schema from your screenshot unfortunately won't suite your business task, but two separate processes and the logic above will do the trick.

 

Another option will be creating a cron task (in Quartz) to send an email. This is a harder task than two processes so please use two processes.

 

Best regards,

Oscar

Oscar Dylan,

Oscar, thank you!

 

Best regards,

Jana

Show all comments