Announcement

Collapse
No announcement yet.

filter for second view?

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

  • filter for second view?

    In quotes entity, I changed the view from products to case/matter. I added a filter based on the account in the quotes entity. I created a method to create a view for another entity, so when users listens to case/matter model, it pops up another view which I created. the issue is, i'm unable to create a filter for the second view based on the case/matter.
    PHP Code:
    if(model_case.get('id'){
    filterCase = {
    case: {
    type:'equals',
    field:'id',
      
    value:model_case.get('id',
      
    valueName:model_case.get('name')
    };

    The code above didn't work. Then I utilized the getmodelfactory function to grab the parentId and the parentType, but still was unsuccessful.
    PHP Code:
      var filterCase null;
      if(
    model_case.get('id')){
      
    this.getModelFactory().create(Call,function(zmodel){
      
    zmodel.fetch().done(function(){
      if(
    model_case.get('id')) {
      
    filterCase = {
      case: {
      
    type'equals',
      
    field'parentId',
      
    valuezmodel.get('parentId'),
      
    valueNamezmodel.get('parentName')
      }
      };
      }
      }.
    bind(this));
      },
    this);
      } 

  • #2
    Call should be a string

    this.getModelFactory().create('Call',function(zmodel){

    Comment


    • #3
      My apologies for not adding quotations around Call. In my code it had the string quotations, and it didn't work. I manage to resolve the issue anyway.
      Last edited by elbowprogrammer; 03-02-2016, 02:44 PM.

      Comment

      Working...
      X