Topics In Demand
Notification
New

No notification found.

Blog
Netsuite Transaction search performance

March 10, 2018

4370

0

I am utilizing Netsuite API (variant v2016_2) to seek information. With underneath code, it appears that Netsuite requiring much investment to give reaction for the question. I am looking GL exchange of periticular period that has 149 MainLine record and 3941 LineItem (Journal Entries) record and Netsuite takes very nearly 22 minutes to give this information accordingly. The following is code scrap that I am utilizing to look exchange.

public void GetTransactionData() {         DataTable dtData = new DataTable();         string errorMsg = ;         LoginToService(ref errorMsg);          TransactionSearch objTransSearch = new TransactionSearch();         TransactionSearchBasic objTransSearchBasic = new TransactionSearchBasic();         SearchEnumMultiSelectField semsf = new SearchEnumMultiSelectField();          semsf.@operator = SearchEnumMultiSelectFieldOperator.anyOf;         semsf.operatorSpecified = true;         semsf.searchValue = new string[] { Journal };         objTransSearchBasic.type = semsf;           objTransSearchBasic.postingPeriod = new RecordRef() { internalId = 43 };          objTransSearch.basic = objTransSearchBasic;           //Set Search Preferences         SearchPreferences _searchPreferences = new SearchPreferences();         Preferences _prefs = new Preferences();         _serviceInstance.preferences = _prefs;         _serviceInstance.searchPreferences = _searchPreferences;         _searchPreferences.pageSize = 1000;         _searchPreferences.pageSizeSpecified = true;         _searchPreferences.bodyFieldsOnly = false;          //Set Search Preferences          try         {             SearchResult result = _serviceInstance.search(objTransSearch);     /*     Above line taking almost 22 minutes for below record count      result.recordList.Length = 149     Total JournalEntryLine = 3941     */               List<JournalEntry> lstJEntry = new List<JournalEntry>();             List<JournalEntryLine> lstLineItems = new List<JournalEntryLine>();              if (result.status.isSuccess)             {                 for (int i = 0; i <= result.recordList.Length - 1; i += 1)                 {                      JournalEntry JEntry = (JournalEntry)result.recordList[i];                     lstJEntry.Add((JournalEntry)result.recordList[i]);                      if (JEntry.lineList != null)                     {                          foreach (JournalEntryLine line in JEntry.lineList.line)                         {                             lstLineItems.Add(line);                         }                     }                 }             }               try             {                 _serviceInstance.logout();             }             catch (Exception ex)             {              }         }          catch (Exception ex)         {             throw ex;         }     }

I can’t realize that If I am missing something in my code or this is something about the information. If it’s not too much trouble recommend me some kind of answer for this.


That the contents of third-party articles/blogs published here on the website, and the interpretation of all information in the article/blogs such as data, maps, numbers, opinions etc. displayed in the article/blogs and views or the opinions expressed within the content are solely of the author's; and do not reflect the opinions and beliefs of NASSCOM or its affiliates in any manner. NASSCOM does not take any liability w.r.t. content in any manner and will not be liable in any manner whatsoever for any kind of liability arising out of any act, error or omission. The contents of third-party article/blogs published, are provided solely as convenience; and the presence of these articles/blogs should not, under any circumstances, be considered as an endorsement of the contents by NASSCOM in any manner; and if you chose to access these articles/blogs , you do so at your own risk.


© Copyright nasscom. All Rights Reserved.