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?
Get list of objects and its fields in Netsuite
netsuite
Related Solutions
I answered this on another question and thought I would update it here as well...
I stumbled upon this question with the same issue as
<platformCore:message>The getAll record type is required.</platformCore:message>
Figured I would come post a snippet of what a proper soap envelope should look like for this request. As others have mentioned, this call only supports certain record types...but once you identify the record type you desire, the below code should help.
<soap:Envelope xmlns:platformFaults="urn:faults_2014_1.platform.webservices.netsuite.com" xmlns:platformMsgs="urn:messages_2014_1.platform.webservices.netsuite.com" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="urn:platform_2014_1.webservices.netsuite.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Header>
<passport>
<email>test@example.com</email>
<password>*******</password>
<account>AccountNumber</account>
<role internalId="3"/>
</passport>
</soap:Header>
<soap:Body>
<platformMsgs:getAll xmlns="urn:messages_2014_1.platform.webservices.netsuite.com" xmlns:platformMsgs="urn:messages_2014_1.platform.webservices.netsuite.com">
<platformMsgs:record recordType="currency"/>
</platformMsgs:getAll>
</soap:Body>
</soap:Envelope>
Also we are using the node-soap module to communicate with this web service and here is what it looks like from that perspective as well.
soap.createClient(this.url, function (err, client) {
client.addSoapHeader({
passport: {
email: 'test@example.com',
password: 'pass',
account: 'Acct Number',
role: {
attributes: { internalId: 3 }
}
}
});
client.getAll({
"record": {
"attributes": {
"recordType": "currency"
}
}
}, callback);
});
});
Anyways I hope this helps others as it did stump me for awhile.
Best Answer
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