Announcement

Collapse
No announcement yet.

Remove default case number [#Value] in case autoreply

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Remove default case number [#Value] in case autoreply

    I'm trying to remove the default case number in the subject field.

    Searched on Google, but unfortunately i can't find the solution.

    The subject in E-mail templates is like {Case.casenumber} {Case.name} ABC02345 Testcase
    When the case-autoreply is send the subject is like: [#23] ABC02345 Testcase

    How can i remove the leading caseID ([#23] in above example?

    Thanks in advance.

    Emil
    Last edited by Emilvb; 11-10-2022, 07:47 PM.

  • #2
    Hi All,

    Does anyone know how we can adjust this?

    Comment


    • #3
      you need to create a custom activities panel for case entity, follow steps below:

      1- Create a new file under custom/Espo/Custom/Resources/metadata/ClientDefs/Case.json
      Code:
      {
      "sidePanels":{
      "detail":[
      {
      "name":"activities",
      "label":"Activities",
      "view":"custom:views/case/record/panels/activities",
      "aclScope": "Activities"
      }
      ],
      "detailSmall":[
      {
      "name":"activities",
      "label":"Activities",
      "view":"custom:views/case/record/panels/activities",
      "aclScope": "Activities"
      },
      ]
      }
      }​

      2 - Create the custom activities panel under client/custom/src/views/case/record/panels/activities.js
      Code:
      define('custom:views/case/record/panels/activities', ['crm:views/record/panels/activities'], function (Dep) {
        return Dep.extend({
            getComposeEmailAttributes: function (scope, data, callback) {
               data = data || {};
               Espo.Ui.notify(' ... ');
               Dep.prototype.getComposeEmailAttributes.call(this, scope, data, function (attributes) {
                   attributes.name = this.model.get('name');
                   this.ajaxGetRequest('Case/action/emailAddressList?id=' + this.model.id).then(function (list) {
                   attributes.to = '';
                   attributes.cc = '';
                   attributes.nameHash = {};
                   list.forEach(function (item, i) {
                     if (i === 0) {
                          attributes.to += item.emailAddress + ';';
                     } else {
                          attributes.cc += item.emailAddress + ';';
                    }
                  attributes.nameHash[item.emailAddress] = item.name;
             });
            Espo.Ui.notify(false);
            callback.call(this, attributes);
             }.bind(this));
          }.bind(this))
         },
       });
      });
      Hope this helps.

      Comment

      Working...
      X