Does anyone know if its possible to either export ...
# suitescript
j
Does anyone know if its possible to either export all record/field info from the Records Catalog as csv/json/etc, or fetch that data using some API? I am looking into building a tool/library that generates typescript type definitions for records, and would need some way of programmatically getting all the records/fields. (Custom records/fields are super easy, you can get that with a search in NetSuite, but I'm not sure what the best way would be for native stuff)
Why do I always stumble upon help right after posting questions... it looks like this may actually possible with https://timdietrich.me/blog/netsuite-records-catalog-api/ Will leave this here in case someone else finds this useful/has any other ideas
s
There's work in progress on code generation for custom records and fields via SDF here https://github.com/ExploreConsulting/netsuite-fasttrack-toolkit-ss2/tree/master/CodeGeneration
NFT takes the approach that just defines the built-in records once and includes them as base classes in the library.
So in that regard, it's only custom fields/records that are interesting since they are what changes most between NS accounts.
note, the readme is a bit dated, and unfortunately the lastest work on the dev branch isn't pushed to github yet
j
Oh woah that library looks really cool, it looks very similar to what i was wanting to build. Thanks for the link!! i had never seen it before
s
We use it for all our scripts, have been for many years. It makes SuiteScript feel like sane TypeScript 101, and results in fewer bugs and often 1/3 the code 🙂
j
This is exactly what i was wanting
s
Well, I suppose you can give NFT a try.
j
I definitely will
s
or use it as one point of reference for your own implementation
👍 1