Announcement

Collapse
No announcement yet.

Custom filter on account link field

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

  • Custom filter on account link field

    Hello everyone,

    is there a possibility in EspoCRM to add a custom select filter ("Typ" "AnyOf" "Partner") to a linked account field. The filter should be active only when selecting an account with this field (see Screenshot).


    Thanks in advance,

    Regards,
    Thomas

  • #2
    If I correct understand you can make 'partner' field custom view like this:

    Code:
    Espo.define('custom:views/opportunity/fields/knife', 'views/fields/link', function (Dep) {
    
    console.log('custom knife field view');
    
    return Dep.extend({
    
    getSelectFilters: function () {
    
    return {
    'width': {
    attribute: 'width',
    type: 'between',
    value: [17,22]
    }
    };
    },
    
    getSelectBoolFilterList: function() {
    return ['correct', this.model.get('id')];
    },
    
    });
    
    });
    In the 'Firmen' entityDef code like this :

    Code:
     "knife": {
    "type": "link",
    "view": "custom:views/opportunity/fields/knife"
    },

    Comment


    • #3
      Thanks dimyy, now it works perfect.

      Comment

      Working...
      X