NetSuite: How can I get a list of custom fields using suitesql or REST?

3.4k Views Asked by At

Using the REST suiteql query endpoint or the records endpoints, is there a way to query NetSuite to get a list of custom fields?

3

There are 3 best solutions below

0
On BEST ANSWER

You can use SuiteQL to list customfields.

For example to list entity custom fields:

{
"q": "SELECT * FROM CustomField where fieldtype = 'ENTITY'"
}

Use Setup -> Records Catalog to see the records you can query. It includes custom records and custom lists. ex. If you have a custom list called customlist_year then the records browser will include it and you can do a query like: SELECT * FROM customlist_year with SuiteQL.

One caveat: SuiteQL is still in development so the fieldnames and results might change with a NetSuite release. Make sure things get tested with a Release Preview account so you are ready for any changes when they hit your production account.

1
On

Any specific reason to use suiteqql? With a normal RESTlet you can load a dummy record and read all field names starting with "cust".

0
On

Using RESTWEB Services you can fetch the schemas of the objects. Below is the screen shot which gives the sample rest web service request.

enter image description here