Is there a way to get list of all record types - both standard and custom (employee, lead, customer etc.) and their fields using APIs (SOAP or REST) in Netsuite?
2 Answers
List of all supported records through Suitescript is available at https://system.netsuite.com/help/helpcenter/en_US/RecordsBrowser/2012_2/index.html
List of all supported records through Websrevices is available at http://tellsaqib.github.io/NSPHP-Doc/class_record.html
For getting List of all field available for a particular record type use getAllFields() and getAllLineItemFields(group)
http://dreamxtream.wordpress.com/2012/01/18/getting-all-fields/
For getting list of Custom Field using Webservices use http://tellsaqib.github.io/NSPHP-Doc/class_net_suite_service.html#a628c9eb07887e8a540481850696f7a0e

- 2,470
- 3
- 19
- 32
-
1The link which you shared here for webservice lists out all the supported record. But I want them to fetch using web service (dynamically in the code), so that if in future anything changes in these records should automatically get reflected. How can I do that? – Sachin Aug 10 '15 at 09:30
-
Second link is broken. – fivedogit Sep 15 '16 at 14:27
-
@Saqib did you figure out if it is possible with SOAP API? (SuiteTalk), it seems that is possible only via PHP or Java sdk.. – Dolfa Sep 05 '18 at 19:05
The answer given by Saqib is correct. If you want to show them in a select field you could use this function.
var form = nlapiCreateForm('New Form');
form.addField('custpage_field', 'select', 'Select A Record Type', '-123'); //Here -123 is the internal id for the record types given to the source for the addField function.
You could get all the internal id's of the record types you could create from this link(in the List/Record Type IDs). https://system.na1.netsuite.com/help/helpcenter/en_US/Output/Help/section_N3144618.html#bridgehead_N3147714

- 5,659
- 2
- 20
- 41