I tried it first with a Saved Search, but the data...
# suitescript
m
I tried it first with a Saved Search, but the data structure just wasn't the way I needed it and changing it was going to be a mess of for loops, so I am looking at other/better ways to return what I need.
b
generally you can use the getValue and getSublistValue methods of your record object to get the data in specific fields
only log the things that you want instead of everything
alternatively, use JSON.stringify on your record object and use substring or substr on the string and print it in parts
m
hey, thank you. So I've used the getValue on Saved Search results... so that and getSublistValue would I just run that on the results on an entire record load? Like . . . .
var poRecords = record.load({ type: record.Type.PURCHASE_ORDER, id: uniqueOrders[i], isDynamic: true });
then run those on poRecords?
s
you'll need to know what fields and sublists you want to retrieve first
m
I know the fields . .. sublists I'll have to look into