Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
webservices integration
here is a sample to login, logout and create a task.
try {
NetSuiteServiceLocator service = new NetSuiteServiceLocator();
service.setMaintainSession(true);
NetSuitePortType port = service.getNetSuitePort();
RecordRef role = new RecordRef();
role.setInternalId("3");
Passport passport = new Passport();
passport.setEmail("test@test.com");
passport.setPassword("testpassword");
passport.setRole(role);
passport.setAccount("TSTDRV123456");
// login
StatusDetail[] status = (port.login(passport)).getStatus();
// create a task
Task task = new Task();
task.setTitle("task 001");
port.add(task);
// logout
status = (port.logout()).getStatus();
} catch (Exception ex) {
ex.printStackTrace();
}