This topic contains 2 replies, has 0 voices, and was last updated by tzvig 7 years, 1 month ago.

  • Author
    Posts
  • #6477 Score: 0

    yohanes
    • Contributions: 0
    • Level 1

    Hi Guys,

    I tried to get Invoice record via web services,. It success, i can read Body & Item list

    but in Item List -> inventory detail, the value is null.

    Any way I can read data (lotnumber, bin) from inventory detail in transaction ?

    I’m using c#

    below sample from my code

    SearchResult res;

    TransactionSearch tranSearch = new TransactionSearch();

    TransactionSearchBasic tranBasic = new TransactionSearchBasic();

    TransactionSearchAdvanced transAdv = new TransactionSearchAdvanced();

    #region netsuite preference

    Preferences preference = new Preferences();

    preference.warningAsErrorSpecified = true;

    preference.warningAsError = false;

    _service.preferences = preference;

    SearchPreferences searchPreferences = new SearchPreferences();

    searchPreferences.pageSize = 10;

    searchPreferences.pageSizeSpecified = true;

    searchPreferences.bodyFieldsOnly = false;

    _service.searchPreferences = searchPreferences;

    #endregion

    #region tranType = Invoice

    SearchEnumMultiSelectField searchEnum = new SearchEnumMultiSelectField();

    String[] tranTypes = new String[1];

    String tranType = “_invoice”;

    tranTypes[0] = tranType;

    searchEnum.operatorSpecified = true;

    searchEnum.searchValue = tranTypes;

    searchEnum.@operator = SearchEnumMultiSelectFieldOperator.anyOf;

    #endregion

    RecordRef[] itemTypes = new RecordRef[1];

    RecordRef itemType = new RecordRef();

    itemType.internalId = sInvInternalID;

    itemType.type = RecordType.invoice;

    itemType.typeSpecified = true;

    itemTypes[0] = itemType;

    SearchMultiSelectField searchMulti = new SearchMultiSelectField();

    searchMulti.@operator = SearchMultiSelectFieldOperator.anyOf;

    searchMulti.operatorSpecified = true;

    searchMulti.searchValue = itemTypes;

    tranBasic.type = searchEnum;

    tranBasic.internalId = searchMulti;

    tranSearch.basic = tranBasic;

    res = _service.search(tranSearch);
    This is a cached copy. Click here to see the original post.

  • #6478 Score: 0

    chanarbon
    • Contributions: 0
    • Level 1

    The value for the mentioned field normally can be found on ItemList[]->inventoryDetail->InventoryAssignmentList[]

  • #6479 Score: 0

    tzvig
    • Contributions: 0
    • Level 1

    Has anyone been successful with this. Please post sample code that worked.

You must be logged in to reply to this topic.