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.
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:
if(model_case.get('id'){
filterCase = {
case: {
type:'equals',
field:'id',
value:model_case.get('id',
valueName:model_case.get('name')
};
}
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',
value: zmodel.get('parentId'),
valueName: zmodel.get('parentName')
}
};
}
}.bind(this));
},this);
}
Comment