Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8666095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:38:41+00:00 2026-06-12T17:38:41+00:00

I have to extract data from a saved search and drop each column into

  • 0

I have to extract data from a saved search and drop each column into a csv file. This search is routinely over 300 lines long and I need to parse each record into a separate csv file ( so 300+ csv files need to be created )

With all the previous searches I have done this with the amount of columns required were small (less then 10) and the amount of joins minimal to none, so efficiency wasn’t a large concern.

I now have a project that has 42 fields in in the saved search. The search is built off of a sales order and includes joins to the customer record and item records.

The search makes extensive use of custom fields as well as formula’s.

What is the most efficient way for me to step through all of this?

I am thinking that the easiest method (and maybe the quickest) is to wrap it in a

foreach (TransactionSearchRow row in searchResult.searchRowList)
{
     using (var sw = System.IO.File.CreateText(path+filename))
     {
      ....
     }
 }

block, but I want to try and avoid

 if (customFieldRef is SelectCustomFieldRef)
 {
     SelectCustomFieldRef selectCustomFieldRef = (SelectCustomFieldRef)customFieldRef;
     if (selectCustomFieldRef.internalId.Equals("custom_field_name"))
     {
       ....
     }
  }

as I expect this code to become excessively long with this process. So any ideas are appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T17:38:43+00:00Added an answer on June 12, 2026 at 5:38 pm

    Using the NetSuite WSDL-generated API, there is no alternative to the nested type/name tests when reading custom fields. It just sucks and you have to live with it.

    You could drop down to manual SOAP and parse the XML response yourself. That sounds like torture to me but with a few helper functions you could make the process of reading custom fields much more logical.

    The other alternative would be to ditch SuiteTalk entirely and do your search in a SuiteScript RESTlet. The JavaScript API has much simpler, more direct access to custom fields than the SOAP API. You could do whatever amount of pre-processing you wanted on the server side before returning data (which could be JSON, XML, plain text, or even the final CSV) to the calling application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a pgp-encrypted file that I need to extract data from at runtime.
I have an Excel file from which I have to extract the required data
I wrote some code to extract data from xls and save them into csv.
I'm using Selenium for work and I have extract some data from //ul, unfortunately
I have been trying to extract data from a database and fill in a
I have a PDF file containing some tabular data. http://dl.dropbox.com/u/44235928/sample_rotate-0.pdf I have to extract
I have written a few Python tools in the past to extract data from
I'm attempting to extract data from log files and organise it systematically. I have
I am trying to extract data from XML file and save it my C#
I have a YQL query that extracts data from a page and returns it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.