Reputation: 67
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?
Upvotes: 4
Views: 18399
Reputation: 2480
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
Upvotes: 4
Reputation: 5629
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
Upvotes: 1