当我尝试使用Webservice从Netsuite检索帐户详细信息时,期初余额始终返回null。
我使用以下代码检索帐户详细信息:
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 :(得分: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;