Where do I find the RECORD_TYPE_ID?
# ask-stanley-ai
c
Where do I find the RECORD_TYPE_ID?
c
AI generated answer (using internal Slack threads):
The RECORD_TYPE_ID can be found in different ways depending on the context. 1. If you are doing a search, the RECORD_TYPE_ID is stored in the
recordType
key of the search result object. Every non-summarized
N/search.Result
instance has an
id
and
recordType
property. Here is a sample code snippet:
Copy code
javascript
var itemSearchObj = search.create({
   type: "item",
   filters:
   [
      ["internalidnumber","equalto","12345"]
   ],
   columns:[]
});
itemSearchObj.run().each(function(result){
   log.debug('Item Type', result.recordType)
   return true;
});
2. If you are looking for the
typeId
of a specific record type like 'Customer List Record Type', you can find it in the URL when you navigate to the list definition in the UI. For the native customer record, the
typeId
is "_customer". 3. If you have a custom record that has a field where the administrator can select a record type using the native List/Record Field: Record Type, and you need the Script ID instead of the Record Type ID, you can use the
Scripted Record Type
and use sourcing to get the script id. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.816781938
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.813890457
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.813131213
Please provide your feedback on this answer.