Hi any pointers into scripting subrecords for Sale...
# suitescript
i
Hi any pointers into scripting subrecords for Sales Team and Lead Contacts? I can get addresses and edit /add via:
Copy code
var subrecord = rec.getSublistSubrecord({
      sublistId: "salesGroup",
      fieldId: 'salesteam',
      line: 0
    });
But I'm missing how to find both the sublistId and the fieldId of those ones. Thanks!
a
rmac is usually prefix for sublist
if you hover over the list in bottom left it will show you the internal id of sublist
for fields also you can refer the record browser
b
also learn the difference between a subrecord (https://system.na0.netsuite.com/app/help/helpcenter.nl?fid=section_n2940361.html#!), and the different types of sublists . Specifically which ones support suitescript.(https://system.na0.netsuite.com/app/help/helpcenter.nl?fid=section_n2946222.html)
💯 1
lazy answer for learning is that subrecords are accesssed via an icon
sublists that you cant modify via the ui aren't accessible to suitescript either
s
or use NFT which treats everything essentially the same (objects and collections thereof) 🙂