Is there any way to do a search to get the (displa...
# suitescript
a
Is there any way to do a search to get the (display) name of a sublist field? For example if I pass it it
price
I want to get
Price Level
since that's what display on the sublist. Or if I pass in a
custcol_my_column_for_data
I want to see however it displays in my sublist
So it seems for custom columns, if I had the internal id, I could load the record and do rec.getValue('label')
However this isn't going to help for 3 reasons. 1. I don't have the internalid 2. I need to get many at a time so a a record load wont work 3. It won't help for native fields
Any ideas of how I could accomplish this?
e
create a record in memory and then use
myRec.getSublistFields
in combination with
myRec.getSublistField
a
@ehcanadian Thanks for your response. I don't understand the suggestion. You mean I should create a custom record to store all the fields and labels?
e
No, it's already stored. Use record.create
a
I see. You mean if I do getField and then I call getColumn on that, I can the label from there
e
You have the column names, so for each column name you would use getSubListField to get the label
assuming it's not joined, that's more work of course
a
I see. Perfect. Worked Beautifully. Thanks @ehcanadian!