AF
HomeTagSubmit NotesAsk AnythingLoginSubscribe Us
AF
1. Feel Free to ask and submit anything on Anyforum.in and get satisfactory answer
2. Registration is not compulsory, you can directly login via google or facebook
3. Our Experts are looking for yours ?.



web-service-netsuite: How can we get Customer Internal ID from suitetalk?

I created User login authentication using Using suitetalk and generate passport in c#, is there any possible to get the Internal id of login customer?

web-service x 19
netsuite x 18
Posted On : 2019-08-14 10:14:41.0
profile Haswanth Varma Gatti - anyforum.in Haswanth Varma Gatti
300
up-rate
3
down-rate

Answers


C#:
----------------
private void getCustomer()
{
// This operation requires a valid session
this.login( true );
// Prompt for the nsKey
_out.write( "\nnsKey for record to be retrieved: " );
String nsKey = _out.readLn();
// Invoke the get() operation to retrieve the record
RecordRef recordRef = new RecordRef();
recordRef.internalId = nsKey;
recordRef.type = RecordType.customer;
recordRef.typeSpecified = true;
ReadResponse response = _service.get( recordRef );
// Process response from get() operation
_out.info( "\nRecord returned from get() operation: " );
if ( !response.status.isSuccess )
{
_out.info(
"ERROR: " +
getStatusDetails( response.status ) );
}
else
{
Customer customer = (Customer) response.record;
_out.info(
"\nnsKey=" + customer.internalId + ", " +
"\nentityId=" + customer.entityId +
(customer.companyName==null ? "" : ("\ncompanyName=" + customer.companyName)) +
(customer.stage==null ? "" : ("\nstage=" + customer.stage)) +
(customer.email==null ? "" : ("\nemail=" + customer.email)) +
(customer.phone==null ? "" : ("\nphone=" + customer.phone)) +
"\nisInactive=" + customer.isInactive +
(!customer.dateCreatedSpecified ? "" : ("\ndateCreated=" +
customer.dateCreated.ToShortDateString())) );
}
}

Posted On : 2019-08-18 19:37:40
Satisfied : 0 Yes  0 No
profile Rishi Kumar - anyforum.in Rishi Kumar
523188227545
Reply This Thread
up-rate
0
down-rate



Post Answer
Please Login First to Post Answer: Login login with facebook - anyforum.in