2013-01-16 128 views
0

儘管我嘗試使用Webservice從Netsuite檢索帳戶詳細信息,但期初餘額始終返回空值。使用網絡服務檢索網絡帳戶結算餘額

我使用下面的代碼來獲取賬戶細節:

AccountSearch accountSearch = new AccountSearch(); 
AccountSearchBasic accBasic = new AccountSearchBasic(); 
accountSearch.setBasic(accBasic); 
port.search(accountSearch); 

我使用port.get(recordRef),port.getList(recordRef [])和port.getAll(getAllrecord)也嘗試過,但得到有相同的結果。有沒有其他的方式來檢索使用webservice的Netsuite帳戶的細節?

在此先感謝

回答

0

這可能有助於

public boolean performSearch(NetSuitePortType p_objportCall) throws Exception 
{ 
    boolean status = false; 
    AccountSearchBasic l_objaccountSearchBasic = new AccountSearchBasic(); 
    try 
    { 
     SearchResult l_objSearchResult = p_objportCall.search(l_objaccountSearchBasic); 
     System.out.println(" Account Search Number of records: " +l_objSearchResult.getTotalRecords()); 
     if (l_objSearchResult.getTotalRecords() > 0) 
     { 
      processResults(l_objSearchResult.getRecordList()); 
     } 
    } 
    catch (Exception e) 
    { 
     System.err.println("Acct Search performsearch: "+e.toString()); 
     throw e; 
    } 
    return status;