NetSuite: Automatically Create TAX Nexus for all USA and Canada States

Code is not perfect and is not production ready. Iterate through the List of States vs Countries Create the Tax Nexus using the internal ID of the state for the RecordRef //FOR USA AND CANADA STATES Iterator statesIterator = stateMapUSAAndCanadaForNexusCreation.entrySet().iterator(); int ctr = 1; System.out.println(“Total Size ” + stateMapUSAAndCanadaForNexusCreation.size()); while (statesIterator.hasNext()) { Map.Entry countryVsState =
Continue reading NetSuite: Automatically Create TAX Nexus for all USA and Canada States

NetSuite: Automatically Create TAX Nexus for all Countries (252)

This piece of code will create TAX Nexus for all these countries For USA and Canada States, please read this post Iterator it = countryMapForNexusCreation.entrySet().iterator(); int i = 1; while (it.hasNext()) { Map.Entry pair = (Map.Entry)it.next(); //System.out.println(i + “: Code: ” + pair.getKey() + ” = ” + pair.getValue()); createNexus((Country)pair.getKey(),(String)pair.getValue()); it.remove(); // avoids a ConcurrentModificationException
Continue reading NetSuite: Automatically Create TAX Nexus for all Countries (252)

NetSuite: Get all country list

This is a Java Snippet to get all the countries in NetSuite public void getCountryList() throws Exception{ GetSelectValueFieldDescription desc = new GetSelectValueFieldDescription(); desc.setRecordType(RecordType.customer); desc.setSublist(“addressbookList”); desc.setField(“country”); GetSelectValueFilter myfilter = new GetSelectValueFilter(); myfilter.setOperator(GetSelectValueFilterOperator.contains); myfilter.setFilterValue(“states”); GetSelectValueResult result = _port.getSelectValue(desc, 0); BaseRefList baseRef = result.getBaseRefList(); System.out.println(“Total countries: ” + result.getTotalRecords()); //Loop to all the values for (int i =
Continue reading NetSuite: Get all country list