1

I am writing suitescripts (currently 2.1) and one thing I am trying to do is to know what type of record a particular field on a record is. In suiteTalk this can be done via the recordRef's .type being looked at such as a Sales order's Entity field is a record ref that would say entity and you can know the record type from there. (Similarly for a custom record a transaction may have a field which may have a type of custRec_MyCustSpecialField, etc). In suitescript when i get a field from a given record and try to look at it's .type it will give me integer, string, select etc. As in the event of the Entity field it's type is "select" and not really "Entity" and I can't find any way to get that true type. I wondered if anyone had any ideas. The idea here is that I wanted this to be dynamic so no matter what field I was trying to look at, I could further dig into it (for example maybe trying to find a field/fields that reside in that reference fields values (Maybe an address's state for example) but I can't find a way to do that. I realize the record catalog can be of assistance here if you were looking on your own but I was hoping to find a way inside my script itself.

I would use record.load or record.getFields but both of those require both an ID (which i think i could provide) as well as a type which is what I am struggling to be able to generate or find in scripting.

jvoigt
  • 400
  • 4
  • 23

0 Answers0