コード例 #1
0
    @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;
    }
コード例 #2
0
 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);
 }