Hello People, I want to know if there is a way to ...
# suitescript
a
Hello People, I want to know if there is a way to load a record and get all fields with values in that record and export those values in CSV or Excel format? Any help is appreciated, Thanks.
b
settling for csv is typically much easier than getting excel
the approach of loading a record is uncommon
it usually consists of loading a record, getting its fields, then getting each field's value so that you can make a string formatted as csv
the approach typically begins breaking down when you need to get each sublist to get its fields and related values for each line, it really only makes sense in csv if you only need one sublist
its more common to do a search or query since they already represent data in rows and columns
there are even tasks available to convert searches, queries, and suiteql into csv
a
I have an idea that using export functionality or saved search is a better idea. The thing is, I want to export a large number of records and there is no track of which custom fields or standard fields were used in those records. I want to get all body fields and line fields of every sublist for the record, hence thought of creating a script
b
i dont think you have gotten very far in this, csv will not not represent multiple sublists very well
you can give it a try in the ui first to see what the results look like, you will start seeing duplicated data