10.07.2015 Views

SuiteTalk (Web Services) Platform Guide - NetSuite

SuiteTalk (Web Services) Platform Guide - NetSuite

SuiteTalk (Web Services) Platform Guide - NetSuite

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Web</strong> <strong>Services</strong> OperationsgetPostingTransactionSummary1760.0Java/* Make Record Ref out of an internalId */public static RecordRef mrr(String internalId){RecordRef toRet = new RecordRef();toRet.setInternalId(internalId);return toRet;}public void testPostingWorkflow() throws Exception{c.setCredentials(CRED_DB96_SIC);c.useRequestLevelCredentials();// Show and group by subsidiary, period and account.// These are the very basic columns. If you don't include account,// all amounts will be 0.PostingTransactionSummaryField pagb = new PostingTransactionSummaryField();pagb.setSubsidiary(Boolean.TRUE);pagb.setPeriod(Boolean.TRUE);pagb.setAccount(Boolean.TRUE);PostingTransactionSummaryFilter paf = new PostingTransactionSummaryFilter();paf.setPeriod(new RecordRefList(new RecordRef[]{mrr("109")}));GetPostingTransactionSummaryResult gestalt =c.getPort().getPostingTransactionSummary(pagb,paf,1);ConsolidatedExchangeRateFilter f = new ConsolidatedExchangeRateFilter();f.setPeriod(mrr("109"));f.setToSubsidiary(mrr("1"));GetConsolidatedExchangeRateResult cerr = c.getPort().getConsolidatedExchangeRate(f);for (PostingTransactionSummary unConsolidated :gestalt.getPostingTransactionSummaryList().getPostingTransactionSummary()){ConsolidatedExchangeRate rate = null;for (ConsolidatedExchangeRate testRate :cerr.getConsolidatedExchangeRateList().getConsolidatedExchangeRate()){if(testRate.getFromSubsidiary().getInternalId().equals(unConsolidated.getSubsidiary().getInternalId())){rate = testRate;break;}}if (rate == null)<strong>SuiteTalk</strong> <strong>Platform</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!