Problem with Search

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • krishnapriya
    Senior Member
    • Aug 2017
    • 209

    Problem with Search

    Hi,

    I have used loadList function in quote list view, to add some conditions to the collection so that some quotes are not displayed.

    But when I search something using search bar in the list view, these conditions are not included. Even the loadList function is not called. How can I include this function in search?

    Please help. Thanks in advance.
  • tanya
    Senior Member
    • Jun 2014
    • 4308

    #2
    could you explain better or share the code?

    Comment


    • krishnapriya
      krishnapriya commented
      Editing a comment
      Espo.define('Advanced:Views.Quote.List', 'Views.List', function (Dep) {

      return Dep.extend({

      loadList: function () {

      this.collection.where = [
      {
      field: 'master',
      type: 'equals',
      value: 1
      }
      ];

      Dep.prototype.loadList.call(this);
      },
      });

      });

      This loads only the master quotes in quote list page.
      But if I try to search by name using the search bar, it displays quotations which has master value 0. That means my loadList function is not working when I do a search. Plz help.

      Thanks.
Working...