Announcement

Collapse
No announcement yet.

Change default subject for "send in email" of KB article

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

  • Change default subject for "send in email" of KB article

    Hello,

    How can I change default subject of knowledge base article "send in email" template ? by default the proposed subject is
    "Knowledge base articles: article name"

    I would like to change default subject to:
    "Kb category - article name"

    I have found
    attributes.name += this.getLanguage().translate('KnowledgeBaseArticle ', 'scopeNames') + ': ' + model.get('name');
    in /client/modules/crm/src/knowledge-base-helper.js
    looks like it, but how and where do I redefine it in custom folders ?

    thanks
    Last edited by hellbyte; 12-26-2016, 02:22 PM.

  • #2
    Hi,

    I think it's not supported to do it in custom for now.

    Comment


    • #3
      Originally posted by yurikuzn View Post
      Hi,

      I think it's not supported to do it in custom for now.
      Can you make it customizable in nearest release please?
      It is simple but very good feature.

      Comment


      • #4
        Answering on my own question after some time spent working with espocrm. Maybe for someone who will be interested. Yes, it is possible, also its possible to add "send in email feature" to Documents, like it was done in KB articles:

        1. Create you own knowledge-base-helper.js view in client/custom/src by copying the original
        Espo.define('custom:docs-helper', 'ajax', function (Ajax) {
        ... etc
        2. Change the attributes in the new view, for example:

        Code:
        attributes.name += this.getLanguage().translate('Document', 'scopeNames') + ' - ' + model.get('name');
        
        ...or any other useful changes that your mind produces.. :)
        3. Create custom view for Document (I have added send in email faeture for documents) or KBarticle, or maybe somewhere else
        mine is client/custom/src/views/document/record/detail.js:

        Code:
        Espo.define('custom:views/document/record/detail', 'views/record/detail', function (Dep) {
        
            return Dep.extend({
        
                setup: function () {
                    Dep.prototype.setup.call(this);
        
                    this.dropdownItemList.push({
                        'label': 'Send in Email',
                        'name': 'sendInEmail'
                    });
                },
                actionSendInEmail: function () {
                    Espo.Ui.notify(this.translate('pleaseWait', 'messages'));
                    Espo.require('custom:docs-helper', function (Helper) {
                        var helper = new Helper(this.getLanguage());
        
                        helper.getAttributesForEmail(this.model, {}, function (attributes) {
        ...etc. like in original detail view with this feature
        4. set the new custom view in json
        for docs - custom/Espo/Custom/Resources/metadata/clientDefs/Document.json:
        Code:
          
        "recordViews": {
                "detail": "custom:views/document/record/detail"
        }
        thatsAll now we have customized the email template and added send in email faeture to docs through custom folder, without modifying native code and not worried that new update will kill the changes.
        Last edited by hellbyte; 03-03-2017, 01:52 AM.

        Comment

        Working...
        X