Thursday, 7 February 2013

Login and Logout a session in suitetalk



In order to login and create a session , you need to do something like this

//create an object of Netsuite service   
NetSuiteService session = new NetSuiteService();
//add a cookie container to it
session.CookieContainer = new System.Net.CookieContainer();
//adding login credentials
Passport passport = new Passport();
passport.account = your account id
passport.email = your email id
RecordRef role = new RecordRef();                   
role.internalId = your role(write 3 if administrator account)
passport.role = role;                   
passport.password = your password
//logging in
Status status = session.login(passport).status;
//returning status
return status.isSuccess;


In order to logout of the session, run the following code.

Status status = session.logout().status;
return status.isSuccess;

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Get more information from http://www.netsuiteexpert.in/

    ReplyDelete