@Override
    protected SearchCriteria fillUpSearchCriteria() {
      OpportunitySearchCriteria searchCriteria = new OpportunitySearchCriteria();
      searchCriteria.setSaccountid(new NumberSearchField(AppContext.getAccountId()));

      if (StringUtils.isNotBlank(this.nameField.getValue().trim())) {
        searchCriteria.setOpportunityName(StringSearchField.and(this.nameField.getValue().trim()));
      }

      if (this.myItemCheckbox.getValue()) {
        searchCriteria.setAssignUsers(new SetSearchField<>(AppContext.getUsername()));
      } else {
        searchCriteria.setAssignUsers(null);
      }

      return searchCriteria;
    }
 private void loadOpportunities() {
   OpportunitySearchCriteria criteria = new OpportunitySearchCriteria();
   criteria.setSaccountid(new NumberSearchField(AppContext.getAccountId()));
   criteria.setContactId(new NumberSearchField(contact.getId()));
   setSearchCriteria(criteria);
 }
示例#3
0
 protected void displayAssociateOpportunityList() {
   final OpportunitySearchCriteria criteria = new OpportunitySearchCriteria();
   criteria.setSaccountid(new NumberSearchField(SearchField.AND, AppContext.getAccountId()));
   criteria.setContactId(new NumberSearchField(SearchField.AND, this.beanItem.getId()));
   this.associateOpportunityList.displayOpportunities(this.beanItem);
 }