This topic contains 3 replies, has 0 voices, and was last updated by AnaCampoVe 7 years, 8 months ago.

  • Author
    Posts
  • #6437

    AnaCampoVe

    Hi People!!!

    We are starting to integrate our NetSuite account with the applications we develop inside the company, and to do that, we use SuiteTalk.

    We have been able to login using passport object, and our first exercise is getting the info that is stored for the test customers that we have already inserted in NetSuite.

    But we have a problem with the contacts that appear in the Relationship tab of the customer. When we try to get the one that we have for the customer we are doing tests with, we see that contactRolesList property is null, although we can see in the UI that the customer does have a contact.

    The code that we use to check the contact information is:

    Code:
    RecordRef customerRef = new RecordRef
    {
    internalId = custInternalId,
    type = RecordType.customer,
    typeSpecified = true
    };

    Customer customerItem = (Customer)_service.get(customerRef).record;

    RecordRef contactRef = customerItem.contactRolesList.contactRoles[0].contact;
    Contact contactItem = (Contact)_service.get(contactRef).record;
    Are we using the wrong property to get the Relationships->Contacts information?

    Thanks in advance,

    Ana Campo
    This is a cached copy. Click here to see the original post.

  • #6438

    chanarbon

    Hi Ana,

    If you check the contact in the UI, are you sure that the contact is a contact record and not a contact representation of an employee record. You may check it upon clicking on the name of the contact and if it is an employee contact, the top left part should have “Contact: Employee”

  • #6439

    chanarbon

    If it is a “Contact: Employee”, then it would not show up in the list of contact roles.

  • #6440

    AnaCampoVe

    Thanks for you response, chanarbon !!

    Finally I was able to get the contact information by using a ContactSearch with CustomerJoin.

You must be logged in to reply to this topic.