We are working on C#.Net4.0 desktop application where user enters Netsuite CRM Credtianls and hits the login button.We are able to validate the user login details using passport authentication.Is there any way or api avaliable where we can retirive the list of objects(contact,customer etc) from the Netsuite CRM after successgull login
0
votes
3 Answers
0
votes
For getting Customers use CustomerSearchBasic
http://tellsaqib.github.io/NSPHP-Doc/dd/d21/class_customer_search_basic.html
Similarly for Contacts use ContactSearchBasic
http://tellsaqib.github.io/NSPHP-Doc/dc/d48/class_contact_search_basic.html
0
votes
You need to use a search in order to get these Customer, Contact , etc. Here is a sample code for Customer Search
CustomerSearch custSearch = new CustomerSearch();
CustomerSearchBasic custSearchBasic = new CustomerSearchBasic();
SearchStringField entityId = null;
if (!customerEmailId.Equals(""))
{
entityId = new SearchStringField();
entityId.@operator = SearchStringFieldOperator.contains;
entityId.operatorSpecified = true;
entityId.searchValue = "abc";
custSearchBasic.email = entityId;
}
custSearch.basic = custSearchBasic;
SearchPreferences preferences = new SearchPreferences();
preferences.bodyFieldsOnly = false;
NetsuiteSession.session.searchPreferences = preferences;
SearchResult result = NetsuiteSession.session.search(custSearch);
Similarly you can use searches for contact and other records that you want.
0
votes
Have a look at the SuiteTalk Schema Browser .
In Schema browser you can find the complete definition of NetSuite API.
The UI is not that pretty but you will find all the possible API things there.
For example to find contact or customer search locate Relationship.xsd under records and expand it.