EntityViewInfo evn =newEntityViewInfo();
FilterInfo filter =newFilterInfo();
String companyname ="xxx";
Set idSet =newHashSet();
idSet.add("xxx");
idSet.add("xxx");//第一个参数为需要过滤的字段:单据属性名//第二个参数为用来进行过滤的值(比较布尔、枚举类型时注意:该值对应数据库中的数据)//第三个参数为过滤条件:等于/不等于,类似,包含等等
filter.getFilterItems().add(newFilterItemInfo("company.displayname", companyname +"%",
CompareType.LIKE));//第一个过滤条件
filter.getFilterItems().add(newFilterItemInfo("isEnabled",1, CompareType.EQUALS));//第二个过滤条件
filter.getFilterItems().add(newFilterItemInfo("id", idSet, CompareType.INCLUDE));//第三个过滤条件//若三个条件为 1 and 2 and 3,可以直接设置
evn.setFilter(filter);//如果为 1 or 2 or 3
filter.setMaskString("#0 or #1 or #2");
evn.setFilter(filter);//如果为 (1 or 2) and 3
filter.setMaskString("(#0 or #1) and #2");
evn.setFilter(filter);//如果为 (1 and 2) or 3
filter.setMaskString("(#0 and #1) or #2");
evn.setFilter(filter);//其他情况根据需要设置......
prmtF7.setEntityViewInfo(evn);//给F7设置过滤