Does anyone know if there is a way to get a field ...
# suitescript
s
Does anyone know if there is a way to get a field value from a record by the field's internal id number? Not the text internal id. Am trying to create a custom record where one can define field mapping from list fields.
a
Is the field even have the number internal ID ?
I think you could create the JSON to have the mapping of text internal ID and number ID
but Number ID would be the one you define not the system define AFIK
s
I was hoping to create something was a little more dynamic. Where a user could use a mapping record to map one field to another.
But, I can do that.
message has been deleted
I also might just use the string in a text field.
I'm using list fields, and a Field list to make the selections.
These selections return as the id number rather than the id string.
Maybe I can use a search.
a
@Stefan Holodnick I think you can try creating search on custom record
s
So, a search doesn't work. I think what I'm going to use is the label. And make sure that label is the name of the label on the item field and my custom record field where the mapping is taking place. I can get list of fields on the record by record.getFields() and it includes the label.
b
If you are using a Select Field with the Field as a source, then you can use sourcing to get the script id in an another field
👍 1
s
Oh, great idea! Thank you!